public IEnumerable <IndivPricing> GetIndivPrices(string nationalityId, string professionId) { string SQL = @"select distinct * from new_indvprice where new_nationality = '@nationalityId' and new_profession = '@professionId' and statecode = 0 and new_forweb = 1"; SQL = SQL.Replace("@nationalityId", nationalityId); SQL = SQL.Replace("@professionId", professionId); DataTable dt = CRMAccessDB.SelectQ(SQL).Tables[0]; List <IndivPricing> List = new List <IndivPricing>(); for (int i = 0; i < dt.Rows.Count; i++) { List.Add(new IndivPricing() { Id = dt.Rows[i]["new_indvpriceId"].ToString(), Name = dt.Rows[i]["new_pricename"].ToString(), Number = dt.Rows[i]["new_pricenumber"].ToString(), NationalityName = dt.Rows[i]["new_nationalityName"].ToString(), TypeId = dt.Rows[i]["new_pricetype"].ToString(), TypeName = OptionsController.GetName("new_indvprice", "new_pricetype", 1025, dt.Rows[i]["new_pricetype"].ToString()), ContractMonths = MathNumber.RoundDeciaml(dt.Rows[i]["new_contractmonths"].ToString()), PeriodAmount = MathNumber.RoundDeciaml(dt.Rows[i]["new_periodamount"].ToString()), EveryMonth = MathNumber.RoundDeciaml(dt.Rows[i]["new_everymonth"].ToString()), MonthelyPaid = MathNumber.RoundDeciaml(dt.Rows[i]["new_monthlypaid"].ToString()), PrePaid = MathNumber.RoundDeciaml(dt.Rows[i]["new_monthlypaid"].ToString()), NationalityId = nationalityId, ProfessionId = professionId, }); } return(List); }