public ActionResult Vendor() { if (string.IsNullOrEmpty((string)Session["DealerCode"])) { return(RedirectToAction("NewLogin", "Home")); } if (common.UserRight("2501", "001")) { dealerCode = Session["DealerCode"].ToString(); List <SelectListItem> ddlCity = new List <SelectListItem>(); ddlCity = GeneralMethods.GetDataFromSP("Select_City"); ViewBag.City = ddlCity; List <SelectListItem> ddlState = new List <SelectListItem>(); ddlState = GeneralMethods.GetDataFromSP("Select_State"); ViewBag.State = ddlState; List <SelectListItem> ddlCountry = new List <SelectListItem>(); ddlCountry = GeneralMethods.GetDataFromSP("Select_Country"); ViewBag.Country = ddlCountry; //List<SelectListItem> ddlVendors = new List<SelectListItem>(); //ddlVendors = GeneralMethods.GetDataFromSPWithDealerCode("SP_Select_Vendor",dealerCode); //ViewBag.Vendors = ddlVendors; // List<SelectListItem> ddlCusType = new List<SelectListItem>(); //ddlCusType = GeneralMethods.GetDataFromSPWithDealerCode("SP_SelectVendorType", dealerCode); //ViewBag.CusType = ddlCusType; //DataTable dt = new DataTable(); //List<VendorVM> lst = new List<VendorVM>(); //SqlParameter[] sqlParam = // { // new SqlParameter("@DealerCode",dealerCode) // }; //dt = DataAccess.getDataTable("SP_Select_VendorModal", sqlParam, General.GetBMSConString()); //if (dt.Rows.Count > 0) //{ // lst = EnumerableExtension.ToList<VendorVM>(dt); //} List <VendorVM> lstCustommer = VendorMethods.GetVendorModal(dealerCode); ViewBag.Vendor = lstCustommer; List <AccountVM> lstAccount = AdvSerChargMethods.GetAccountModal(dealerCode); ViewBag.Accounts = lstAccount; } else { TempData["TestAccessError"] = MessageAlert.MsgAuthorized(); return(RedirectToAction("Error", "Definition")); } return(View()); }
public ActionResult ExpenseMain() { if (string.IsNullOrEmpty((string)Session["DealerCode"])) { return(RedirectToAction("Login", "Home")); } dealerCode = Session["DealerCode"].ToString(); ViewBag.ReceiptHead = BMS.ExpenseHeads.Where(x => x.DealerCode == dealerCode).ToList(); List <AccountVM> lstAccount = AdvSerChargMethods.GetAccountModal(dealerCode); ViewBag.Accounts = lstAccount; return(View()); }