private TaxFormulaCalculatedOnInfo GetTaxFormulaChargeCaculatedOnValues(DataRow dr) { TaxFormulaCalculatedOnInfo taxformulachargecalcultedon = new TaxFormulaCalculatedOnInfo(); if (dr["TaxFormulaChargesId"] != DBNull.Value) { taxformulachargecalcultedon.TaxFormulaChargeId = Convert.ToInt32(dr["TaxFormulaChargesId"]); } if (dr["ChargesId"] != DBNull.Value) { taxformulachargecalcultedon.TaxChargesId = Convert.ToInt32(dr["ChargesId"]); } if (dr["ChargesName"] != DBNull.Value) { taxformulachargecalcultedon.TaxChargesName = Convert.ToString(dr["ChargesName"]); } if (dr["IsFixPrice"] != DBNull.Value) { taxformulachargecalcultedon.IsFixPrice = Convert.ToBoolean(dr["IsFixPrice"]); } if (dr["CalculatedOnId"] != DBNull.Value) { taxformulachargecalcultedon.CalculatedOnId = Convert.ToInt32(dr["CalculatedOnId"]); } List <KeyValueInfo> GetChargesRateTypes = LookupInfo.GetChargesRateTypes(); if (taxformulachargecalcultedon.CalculatedOnId == 1) { taxformulachargecalcultedon.CalculatedOnName = GetChargesRateTypes[0].Value; } if (taxformulachargecalcultedon.CalculatedOnId == 2) { taxformulachargecalcultedon.CalculatedOnName = GetChargesRateTypes[1].Value; } if (taxformulachargecalcultedon.CalculatedOnId == 3) { taxformulachargecalcultedon.CalculatedOnName = GetChargesRateTypes[2].Value; } if (dr["Behaviour"] != DBNull.Value) { taxformulachargecalcultedon.Behaviour = Convert.ToString(dr["Behaviour"]); } return(taxformulachargecalcultedon); }
public TaxFormulaCalculatedOnInfo GetTaxFormulaChargeCaculatedOnFormula(TaxFormulaCalculatedOnInfo tfcoi) { //TaxFormulaCalculatedOnInfo taxformulacalonbehaviour = new TaxFormulaCalculatedOnInfo(); tfcoi.TaxFormulaChargeId = tfcoi.TaxFormulaChargeId; tfcoi.TaxChargesId = tfcoi.TaxChargesId; tfcoi.TaxChargesName = tfcoi.TaxChargesName; tfcoi.CalOnBehaviour = tfcoi.CalOnBehaviour; return(tfcoi); }
public void InsertTaxFormulaCalculatedOn(TaxFormulaCalculatedOnInfo taxformulacalculatedon, int taxFormulaChargesId) { List <SqlParameter> sqlParams = new List <SqlParameter>(); sqlParams.Add(new SqlParameter("@TaxFormulaChargesId", taxFormulaChargesId)); Logger.Debug("TaxFormula Controller TaxFormulaChargesId:" + taxFormulaChargesId); sqlParams.Add(new SqlParameter("@IsFixPrice", taxformulacalculatedon.IsFixPrice)); Logger.Debug("TaxFormula Controller IsFixPrice:" + taxformulacalculatedon.IsFixPrice); sqlParams.Add(new SqlParameter("@CalculatedOnId", taxformulacalculatedon.CalculatedOnId)); Logger.Debug("TaxFormula Controller CalculatedOnId:" + taxformulacalculatedon.CalculatedOnId); sqlParams.Add(new SqlParameter("@Behaviour", taxformulacalculatedon.Behaviour)); Logger.Debug("TaxFormula Controller Behaviour:" + taxformulacalculatedon.Behaviour); _sqlHelper.ExecuteNonQuery(sqlParams, Storeprocedures.spInsertTaxFormulaCalculatedOn.ToString(), CommandType.StoredProcedure); }