/// <summary>
        /// Load All Taxes
        /// </summary>
        private List <TaxMast> GetAllTaxMast()
        {
            var FirsttaxMast = new TaxMast()
            {
                TaxOrd         = 2,
                Active         = true,
                TaxApply       = null,
                TaxDefination  = "1",
                TaxDescription = "Goods and Services Tax",
                TaxName        = "GST"
            };
            var secondtaxMast = new TaxMast()
            {
                TaxOrd         = 3,
                Active         = true,
                TaxApply       = null,
                TaxDefination  = "1",
                TaxDescription = "Provincial Sales Tax",
                TaxName        = "PST"
            };

            var ListtaxMast = new List <TaxMast>
            {
                FirsttaxMast,
                secondtaxMast
            };

            return(ListtaxMast);
        }
示例#2
0
        /// <summary>
        /// Method to get all tax mast
        /// </summary>
        /// <returns>List of tax mast</returns>
        public List <TaxMast> GetTaxMast()
        {
            var dateStart = DateTime.Now;

            _performancelog.Debug($"Start,TaxService,GetTaxMast,{string.Empty},{dateStart:hh.mm.ss.ffffff}");

            var taxMastRecordSet = GetRecords("SELECT * FROM TaxMast ORDER BY TaxMast.Tax_Ord ", DataSource.CSCMaster);
            var taxes            = new List <TaxMast>();

            foreach (DataRow dataRow in taxMastRecordSet.Rows)
            {
                var taxMast = new TaxMast
                {
                    TaxOrd         = CommonUtility.GetShortValue(dataRow["TAX_ORD"]),
                    Active         = CommonUtility.GetBooleanValue(dataRow["TAX_ACTIVE"]),
                    TaxApply       = CommonUtility.GetStringValue(dataRow["TAX_APPLY"]),
                    TaxDefination  = CommonUtility.GetStringValue(dataRow["TAX_DEF"]),
                    TaxDescription = CommonUtility.GetStringValue(dataRow["TAX_DESC"]),
                    TaxName        = CommonUtility.GetStringValue(dataRow["TAX_NAME"])
                };
                taxes.Add(taxMast);
            }
            _performancelog.Debug($"End,TaxService,GetTaxMast,{DateTime.Now.Subtract(dateStart).TotalMilliseconds},{DateTime.Now:hh.mm.ss.ffffff}");

            return(taxes);
        }