using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RezerveBeliteHavaPeimaCS
{
    class Class_MablagheMandeh
    {
        Decimal Dec_Mandeh = 0;
        int int_RezerveID = 0;

        public Class_MablagheMandeh(int int_ReserveID)
        {
            this.int_RezerveID = int_ReserveID;
            
        }

        private void UDF_CalcMandeh()
        {
            LSC_TADataContext db = new LSC_TADataContext();
            decimal Dec_Mandeh = 0;
            var Query = from row in db.tblRezerveTickets
                        where row.RezerveID == int_RezerveID
                        select new
                        {
                            row.Mandeh
                        };
            foreach (var Mohasebat in Query)
            {
                Dec_Mandeh = decimal.Parse(Mohasebat.Mandeh.ToString());
            }
            this.Dec_Mandeh = Dec_Mandeh;
        }

        public Decimal Dec_Mande
        {
            get
            {
                return Dec_Mandeh;
            }
        }

        public int int_ReservID
        {
            get
            {
                return int_RezerveID;
            }
        }


    }
}
