public JsonResult Select_VehRecModal(string EnquiryId) { string data = ""; bool result = false; data = VehReceiptMethods.GetRecNo(Session["DealerCode"].ToString()); if (!string.IsNullOrEmpty(data)) { result = true; } return(Json(new { Success = result, Response = data }, JsonRequestBehavior.AllowGet)); }
// GET: VehicleReceipt public ActionResult Main() { if(string.IsNullOrEmpty((string)Session["DealerCode"])) { return RedirectToAction("Login", "Home"); } if (common.UserRight("2015", "001")) { DealerCode = Session["DealerCode"].ToString(); List<SelectListItem> ddlRecNo = new List<SelectListItem>(); ddlRecNo = VehReceiptMethods.GetRecNo(DealerCode); ViewBag.RecNo = ddlRecNo; List<SelectListItem> ddlVersion = new List<SelectListItem>(); ddlVersion = GeneralMethods.GetDataFromSp("Select_Version"); ViewBag.ddlVersion = ddlVersion; List<SelectListItem> ddlVehType = new List<SelectListItem>(); ddlVehType = GeneralMethods.GetDataFromSPWithDealerCode("Select_VehicleType",DealerCode); ViewBag.VehType = ddlVehType; List<SelectListItem> ddlRecType = new List<SelectListItem>(); ddlRecType = GeneralMethods.GetDataFromSPWithDealerCode("Select_ReceiptType",DealerCode); ViewBag.RecType = ddlRecType; List<SelectListItem> ddlTransPort = new List<SelectListItem>(); ddlTransPort = GeneralMethods.GetDataFromSPWithDealerCode("Select_VehicleTransPort", DealerCode); ViewBag.ddlTransPort = ddlTransPort; List<SelectListItem> ddlBrandCode = new List<SelectListItem>(); ddlBrandCode = GeneralMethods.GetDataFromSPWithDealerCode("Select_Brand", DealerCode,"Y"); ViewBag.BrandCode = ddlBrandCode; List<SelectListItem> ddlProdCode = new List<SelectListItem>(); //ddlProdCode = GeneralMethods.GetProduct(); ViewBag.ProdCode = ddlProdCode; List<SelectListItem> ddlColor = new List<SelectListItem>(); ddlColor = GeneralMethods.GetColor(Session["VehicleCategory"].ToString()); ViewBag.Color = ddlColor; List<SelectListItem> ddlCustomers = new List<SelectListItem>(); ddlCustomers = VehReceiptMethods.GetDatafromSP("SP_Select_Customer",DealerCode); ViewBag.Customers = ddlCustomers; List<SelectListItem> ddlVehLoc = new List<SelectListItem>(); ddlVehLoc = VehReceiptMethods.GetDatafromSP("SP_Select_VehLocation",DealerCode); ViewBag.VehLoc = ddlVehLoc; List<SelectListItem> ddlBookingNo = new List<SelectListItem>(); ddlBookingNo = VehReceiptMethods.GetDatafromSP("Select_BookingNo", DealerCode); ViewBag.BookingNo = ddlBookingNo; List<SelectListItem> ddlVendor = new List<SelectListItem>(); ddlVendor = GeneralMethods.GetDataFromSPWithDealerCode("Select_Vendor",DealerCode); ViewBag.Vendor = ddlVendor; List<SelectListItem> ddlLocation = new List<SelectListItem>(); ddlLocation = BookingOrderMethods.GetDataFromSPWithDealerCode("SP_Select_BOLocation_Frieght", DealerCode); ViewBag.Location = ddlLocation; } else { TempData["TestAccessError"] = MessageAlert.MsgAuthorized(); return RedirectToAction("Error", "Definition"); } return View(); }
// GET: DeliveryOrder public ActionResult DOMain(string EnquiryId = "") { if (string.IsNullOrEmpty((string)Session["DealerCode"])) { return(RedirectToAction("Login", "Home")); } if (common.UserRight("2017", "001")) { dealerCode = Session["DealerCode"].ToString(); List <SelectListItem> ddlRecNo = new List <SelectListItem>(); ddlRecNo = VehReceiptMethods.GetRecNo(dealerCode); ViewBag.RecNo = ddlRecNo; List <SelectListItem> ddlVersion = new List <SelectListItem>(); ddlVersion = GeneralMethods.GetDataFromSp("Select_Version"); ViewBag.ddlVersion = ddlVersion; //List<SelectListItem> ddlDONo = new List<SelectListItem>(); //ddlDONo = DeliveryOrderMethods.GetDONo(dealerCode); //ViewBag.DONo = ddlDONo; List <SelectListItem> ddlVehType = new List <SelectListItem>(); ddlVehType = GeneralMethods.GetDataFromSPWithDealerCode("Select_VehicleType", dealerCode, "Y"); ViewBag.VehType = ddlVehType; List <SelectListItem> ddlRecType = new List <SelectListItem>(); ddlRecType = GeneralMethods.GetDataFromSPWithDealerCode("Select_ReceiptType", dealerCode); ViewBag.RecType = ddlRecType; List <SelectListItem> ddlBrandCode = new List <SelectListItem>(); ddlBrandCode = GeneralMethods.GetDataFromSPWithDealerCode("Select_Brand", dealerCode); ViewBag.BrandCode = ddlBrandCode; List <SelectListItem> ddlProdCode = new List <SelectListItem>(); //ddlProdCode = GeneralMethods.GetProduct(); ViewBag.ProdCode = ddlProdCode; List <SelectListItem> ddlColor = new List <SelectListItem>(); ddlColor = GeneralMethods.GetColor(Session["VehicleCategory"].ToString()); ViewBag.Color = ddlColor; List <SelectListItem> ddlCustomers = new List <SelectListItem>(); ddlCustomers = VehReceiptMethods.GetDatafromSP("SP_Select_Customer", dealerCode); ViewBag.Customers = ddlCustomers; List <SelectListItem> ddlVehLoc = new List <SelectListItem>(); ddlVehLoc = VehReceiptMethods.GetDatafromSP("SP_Select_VehLocation", dealerCode); ViewBag.VehLoc = ddlVehLoc; List <SelectListItem> ddlAssignTo = new List <SelectListItem>(); ddlAssignTo = DeliveryOrderMethods.GetDealerEmployee(dealerCode); ViewBag.AssignTo = ddlAssignTo; List <SelectListItem> ddlVendor = new List <SelectListItem>(); ddlVendor = GeneralMethods.GetVendor(); ViewBag.Vendor = ddlVendor; ViewBag.UrlLeadId = EnquiryId; List <SelectListItem> BookingList = new List <SelectListItem>(); BookingList = BookingOrderMethods.GetDataFromSPWithDealerCode("sp_DelCheckList", dealerCode); ViewBag.BookingList = BookingList; } else { TempData["TestAccessError"] = MessageAlert.MsgAuthorized(); return(RedirectToAction("Error", "Definition")); } return(View()); }
// GET: BookingOrder public ActionResult BOMain(string EnquiryId = "") { if (string.IsNullOrEmpty((string)Session["DealerCode"])) { return(RedirectToAction("Login", "Home")); } if (common.UserRight("2014", "001")) { dealerCode = Session["DealerCode"].ToString(); List <SelectListItem> ddlBONo = new List <SelectListItem>(); ddlBONo = BookingOrderMethods.GetDataFromSPWithDealerCode("SP_SelectBONo", dealerCode); ViewBag.BONo = ddlBONo; List <SelectListItem> ddlEnquiry = new List <SelectListItem>(); ddlEnquiry = BookingOrderMethods.GetDataFromSPWithDealerCode("SP_EnquiryID", dealerCode); ViewBag.Enquiry = ddlEnquiry; List <SelectListItem> ddlCusType = new List <SelectListItem>(); ddlCusType = BookingOrderMethods.GetDataFromSPWithDealerCode("SP_SelectCustomerType", dealerCode); ViewBag.CusType = ddlCusType; List <SelectListItem> ddlInvType = new List <SelectListItem>(); ddlInvType = BookingOrderMethods.GetDataFromSP("SP_SelectInvoiceType"); ViewBag.InvType = ddlInvType; List <SelectListItem> ddlInvSubType = new List <SelectListItem>(); ddlInvSubType = BookingOrderMethods.GetDataFromSP("SP_SelectInvoiceSubType"); ViewBag.InvSubType = ddlInvSubType; List <SelectListItem> ddlPriceType = new List <SelectListItem>(); ddlPriceType = BookingOrderMethods.GetDataFromSP("SP_SelectriceType"); ViewBag.PriceType = ddlPriceType; List <SelectListItem> ddlChassisNo = new List <SelectListItem>(); ddlChassisNo = BookingOrderMethods.GetDataFromSPWithDealerCode("SP_SelectChassisNo", dealerCode); ViewBag.ChassisNo = ddlChassisNo; List <SelectListItem> ddlLocation = new List <SelectListItem>(); ddlLocation = BookingOrderMethods.GetDataFromSPWithDealerCode("SP_Select_BOLocation_Frieght", dealerCode); ViewBag.Location = ddlLocation; List <SelectListItem> ddlAssignTo = new List <SelectListItem>(); ddlAssignTo = DeliveryOrderMethods.GetDealerEmployee(dealerCode); ViewBag.AssignTo = ddlAssignTo; List <SelectListItem> ddlCustomers = new List <SelectListItem>(); ddlCustomers = VehReceiptMethods.GetDatafromSP("SP_Select_Customer", dealerCode); ViewBag.Customers = ddlCustomers; ViewBag.AccountOf = ddlCustomers; string ddlCustomer; ddlCustomer = BookingOrderMethods.GetCustomerModal(dealerCode); ViewBag.Customer = ddlCustomer; List <SelectListItem> ddlBrandCode = new List <SelectListItem>(); ddlBrandCode = GeneralMethods.GetDataFromSPWithDealerCode("Select_Brand", dealerCode, "Y"); ViewBag.BrandCode = ddlBrandCode; List <SelectListItem> ddlProdCode = new List <SelectListItem>(); //ddlProdCode = GeneralMethods.GetProduct(); ViewBag.ProdCode = ddlProdCode; List <SelectListItem> ddlColor = new List <SelectListItem>(); ddlColor = GeneralMethods.GetColor(Session["VehicleCategory"].ToString()); ViewBag.Color = ddlColor; List <SelectListItem> ddlRecNo = new List <SelectListItem>(); ddlRecNo = VehReceiptMethods.GetRecNo(dealerCode); ViewBag.RecNo = ddlRecNo; List <SelectListItem> ddlBank = new List <SelectListItem>(); ddlBank = GeneralMethods.GetBank(); ViewBag.Bank = ddlBank; ViewBag.DrwanBank = ddlBank; List <SelectListItem> ddlCity = new List <SelectListItem>(); ddlCity = GeneralMethods.GetCity(); ViewBag.City = ddlCity; List <SelectListItem> ddlPaymentMode = new List <SelectListItem>(); ddlPaymentMode = BookingOrderMethods.GetDataFromSP("sp_PaymentMode_select"); ViewBag.PaymentMode = ddlPaymentMode; List <SelectListItem> BookingList = new List <SelectListItem>(); BookingList = BookingOrderMethods.GetDataFromSP("sp_DocCheckList"); ViewBag.BookingList = BookingList; @Session["ProdCode"] = string.Empty; ViewBag.UrlLeadId = EnquiryId; } else { TempData["TestAccessError"] = MessageAlert.MsgAuthorized(); return(RedirectToAction("Error", "Definition")); } return(View()); }