public ActionResult AddSacCodes() { var SessionModel = Session["User"] as SessionModel; SacCodesModel sm = new SacCodesModel { CountryList = new SelectList(dropdown.BindCountry(), "Value", "Text"), StateList = new SelectList(Enumerable.Empty <SelectList>()), GstList = new SelectList(dropdown.BindGst(null), "Value", "Text"), AplicationTaxTypeList = new SelectList(CommonModel.GetApplicationTax(), "Value", "Text"), }; return(View(sm)); }
public ActionResult AddGst() { GstTaxModel gm = new GstTaxModel(); gm.CountryList = new SelectList(dropdown.BindCountry(), "Value", "Text"); gm.StateList = new SelectList(Enumerable.Empty <SelectList>()); gm.GstcategoryList = new SelectList(dropdown.BindGst(null), "Value", "Text"); gm.DeviceCategoryList = new SelectList(dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text"); gm.DeviceSubCategoryList = new SelectList(Enumerable.Empty <SelectList>()); gm.ApplicableTaxTypeList = new SelectList(CommonModel.GetApplicationTax(), "Value", "Text"); gm.GstHSNCodeList = new SelectList(dropdown.BindGstHsnCode(), "Value", "Text"); gm.SACList = new SelectList(CommonModel.SAC_NumberList(), "Text", "Text"); gm.CTHNumberList = new SelectList(CommonModel.CTH_NumberList(), "Text", "Text"); return(View(gm)); }
public ActionResult EditGstTax(int Gsttaxid) { using (var con = new SqlConnection(_connectionString)) { var result2 = con.Query <GstTaxModel>("SELECT * from MstGstTax Where GstTaxId=@GstTaxId", new { @GstTaxId = Gsttaxid }, commandType: CommandType.Text).FirstOrDefault(); result2.SACList = new SelectList(CommonModel.SAC_NumberList(), "Text", "Text"); result2.CTHNumberList = new SelectList(CommonModel.CTH_NumberList(), "Text", "Text"); result2.CountryList = new SelectList(dropdown.BindCountry(), "Value", "Text"); result2.StateList = new SelectList(dropdown.BindState(), "Value", "Text"); result2.GstcategoryList = new SelectList(dropdown.BindGst(null), "Value", "Text"); result2.DeviceCategoryList = new SelectList(dropdown.BindCategory(new FilterModel { CompId = CurrentUser.CompanyId }), "Value", "Text"); result2.DeviceSubCategoryList = new SelectList(dropdown.BindSubCategory(new Filters.FilterModel { CategoryId = result2.Device_Cat }), "Value", "Text"); result2.ApplicableTaxTypeList = new SelectList(CommonModel.GetApplicationTax(), "Value", "Text"); result2.GstHSNCodeList = new SelectList(dropdown.BindGstHsnCode(), "Value", "Text"); if (result2 != null) { if (result2.Product_Sale_Range != null) { if (result2.Product_Sale_Range.Contains("-")) { string productSale = result2.Product_Sale_Range; string[] parts = productSale.ToString().Split('-'); result2.Product_Sale_From = parts[0]; result2.Product_Sale_TO = parts[1]; } else { result2.Product_Sale_From = result2.Product_Sale_Range; } } } return(View(result2)); } }