Beispiel #1
0
        public ActionResult Dealer()
        {
            Session["CompLogo"] = "";
            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("NewLogin", "Home"));
            }
            if (common.UserRight("2504", "001"))
            {
                string DealerCode             = Session["DealerCode"].ToString();
                List <SelectListItem> ddlCity = new List <SelectListItem>();
                ddlCity      = GeneralMethods.GetDataFromSP("Select_City");
                ViewBag.City = ddlCity;



                List <SelectListItem> ddlCountry = new List <SelectListItem>();
                ddlCountry      = GeneralMethods.GetDataFromSP("Select_Country");
                ViewBag.Country = ddlCountry;
            }
            else
            {
                TempData["TestAccessError"] = MessageAlert.MsgAuthorized();
                return(RedirectToAction("Error", "Definition"));
            }
            return(View());
        }
Beispiel #2
0
        public ActionResult Customer()
        {
            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("NewLogin", "Home"));
            }
            if (common.UserRight("2502", "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> ddlCustomers = new List<SelectListItem>();
                //ddlCustomers = GeneralMethods.GetDataFromSPWithDealerCode("SP_Select_Customer",dealerCode);
                //ViewBag.Customers = ddlCustomers;

                List <SelectListItem> ddlCusType = new List <SelectListItem>();
                ddlCusType      = GeneralMethods.GetDataFromSPWithDealerCode("SP_SelectCustomerType", dealerCode);
                ViewBag.CusType = ddlCusType;

                //DataTable dt = new DataTable();
                //List<CustomerVM> lst = new List<CustomerVM>();

                //SqlParameter[] sqlParam =
                //    {
                //        new SqlParameter("@DealerCode",dealerCode)
                //    };
                //dt = DataAccess.getDataTable("SP_Select_CustomerModal", sqlParam, General.GetBMSConString());

                //if (dt.Rows.Count > 0)
                //{
                //    lst = EnumerableExtension.ToList<CustomerVM>(dt);
                //}
                List <CustomerVM> lstCustommer = CustomerMethods.GetCustomerModal(dealerCode);
                ViewBag.Customer = lstCustommer;

                List <AccountVM> lstAccount = CustomerMethods.Get_AccDesc(dealerCode);
                ViewBag.Accounts = lstAccount;
            }
            else
            {
                TempData["TestAccessError"] = MessageAlert.MsgAuthorized();
                return(RedirectToAction("Error", "Definition"));
            }



            return(View());
        }
Beispiel #3
0
        // GET: GeneralReport
        public ActionResult GRMain(string id)
        {
            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("NewLogin", "Home"));
            }
            if (common.UserRight("2514", "001"))
            {
                dealerCode = Session["DealerCode"].ToString();

                if (id == "BO")
                {
                    ViewBag.Heading = "Booking Order";
                }
                else if (id == "DO")
                {
                    ViewBag.Heading = "Delivery Order";
                }
                else if (id == "PBN")
                {
                    ViewBag.Heading = "Pending Booking Number";
                }
                //else if (id == "PIN")
                //{
                //    ViewBag.Heading = "Pending Invoice Number";
                //}
                else if (id == "PIN")
                {
                    ViewBag.Heading = "Invoice/UnInvoiced Report";
                }
                else if (id == "PP")
                {
                    ViewBag.Heading = "Pending Payments";
                }

                else
                {
                    ViewBag.Heading = "Vehicle Receipt";
                }
            }
            else
            {
                TempData["TestAccessError"] = MessageAlert.MsgAuthorized();
                return(RedirectToAction("Error", "Definition"));
            }
            return(View());
        }
Beispiel #4
0
        // GET: VehicleUpdate
        public ActionResult VUMain()
        {
            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("NewLogin", "Home"));
            }
            if (common.UserRight("2510", "001"))
            {
                dealerCode = Session["DealerCode"].ToString();

                List <SelectListItem> ddlInsuracne = new List <SelectListItem>();
                ddlInsuracne      = VehicleUpdateMethods.GetInsuranceCompanies();
                ViewBag.Insurance = ddlInsuracne;

                //List<SelectListItem> ddlChassisNo = new List<SelectListItem>();
                //ddlChassisNo = GeneralMethods.GetDataFromSPWithDealerCode("SP_SelectChassisNo",dealerCode);
                //ViewBag.ChassisNo = ddlChassisNo;

                List <VehicleStockVM> ddlEngineNo = new List <VehicleStockVM>();
                ddlEngineNo      = VehicleUpdateMethods.GetDataFromSPWithDealerCode("SP_SelectChassisNo&EngineNo", dealerCode);
                ViewBag.EngineNo = ddlEngineNo;

                List <SelectListItem> ddlCustomers = new List <SelectListItem>();
                ddlCustomers      = VehReceiptMethods.GetDatafromSP("SP_Select_Customer", dealerCode);
                ViewBag.Customers = ddlCustomers;

                List <SelectListItem> ddlColor = new List <SelectListItem>();
                ddlColor      = GeneralMethods.GetColor();
                ViewBag.Color = ddlColor;

                List <SelectListItem> ddlBrandCode = new List <SelectListItem>();
                ddlBrandCode      = GeneralMethods.GetDataFromSPWithDealerCode("Select_Brand", dealerCode);
                ViewBag.BrandCode = ddlBrandCode;
            }
            else
            {
                TempData["TestAccessError"] = MessageAlert.MsgAuthorized();
                return(RedirectToAction("Error", "Definition"));
            }


            return(View());
        }
Beispiel #5
0
        // GET: Vehicle
        public ActionResult Vehicle()
        {
            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("NewLogin", "Home"));
            }
            if (common.UserRight("2503", "001"))
            {
                dealerCode = Session["DealerCode"].ToString();

                //List<SelectListItem> ddlVehicle = new List<SelectListItem>();
                //ddlVehicle = GeneralMethods.GetDataFromSPWithDealerCode("SP_Vehicles", dealerCode,"Y");
                //ViewBag.Vehicle = ddlVehicle;

                List <VehicleVM> lstVehicle = VehicleMethods.GetVehicleModal(dealerCode);
                ViewBag.Vehicles      = lstVehicle;
                Session["lstVehicle"] = lstVehicle;

                List <SelectListItem> ddlBrand = new List <SelectListItem>();
                ddlBrand     = GeneralMethods.GetDataFromSPWithDealerCode("Select_Brand", dealerCode, "Y");
                ViewBag.Made = ddlBrand;

                List <SelectListItem> ddlVehicleType = new List <SelectListItem>();
                ddlVehicleType      = GeneralMethods.GetDataFromSPWithDealerCode("Select_VehicleType", dealerCode);
                ViewBag.VehicleType = ddlVehicleType;

                List <SelectListItem> ddlColor = new List <SelectListItem>();
                ddlColor      = GeneralMethods.GetColor();
                ViewBag.Color = ddlColor;
                List <VehicleVM> Get_AccDesc = new List <VehicleVM>();
                Get_AccDesc         = VehicleMethods.Get_AccDesc(dealerCode);
                ViewBag.Get_AccDesc = Get_AccDesc;
            }
            else
            {
                TempData["TestAccessError"] = MessageAlert.MsgAuthorized();
                return(RedirectToAction("Error", "Definitions"));
            }



            return(View());
        }
        // GET: SalesQuotation
        public ActionResult SQMain()
        {
            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("NewLogin", "Home"));
            }
            if (common.UserRight("2509", "001"))
            {
                dealerCode = Session["DealerCode"].ToString();

                List <SelectListItem> ddlCusType = new List <SelectListItem>();
                ddlCusType      = BookingOrderMethods.GetDataFromSPWithDealerCode("SP_SelectCustomerType", dealerCode);
                ViewBag.CusType = ddlCusType;

                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();
                ViewBag.Color = ddlColor;

                List <SelectListItem> ddlChassisNo = new List <SelectListItem>();
                ddlChassisNo      = BookingOrderMethods.GetDataFromSPWithDealerCode("SP_SelectChassisNo", dealerCode);
                ViewBag.ChassisNo = ddlChassisNo;
            }
            else
            {
                TempData["TestAccessError"] = MessageAlert.MsgAuthorized();
                return(RedirectToAction("Error", "Definition"));
            }



            return(View());
        }
Beispiel #7
0
        // GET: VSReport
        public ActionResult VSRMain()
        {
            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("NewLogin", "Home"));
            }
            if (common.UserRight("2501", "001"))
            {
                dealerCode = Session["DealerCode"].ToString();

                List <SelectListItem> ddlVehLoc = new List <SelectListItem>();
                ddlVehLoc         = GeneralMethods.GetDataFromSPWithDealerCode("SP_Select_VehLocation", dealerCode);
                ViewBag.ddlVehLoc = ddlVehLoc;
            }
            else
            {
                TempData["TestAccessError"] = MessageAlert.MsgAuthorized();
                return(RedirectToAction("Error", "Definition"));
            }


            return(View());
        }
Beispiel #8
0
        // GET: VehicleReceipt


        public ActionResult Main()
        {
            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("NewLogin", "Home"));
            }
            if (common.UserRight("2505", "001"))
            {
                DealerCode = Session["DealerCode"].ToString();

                //List<SelectListItem> ddlRecNo = new List<SelectListItem>();
                //ddlRecNo = VehReceiptMethods.GetRecNo(DealerCode);
                //ViewBag.RecNo = ddlRecNo;

                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;


                // ViewBag.RecType = AccountCode;

                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> txtcolordesc = new List <SelectListItem>();
                txtcolordesc  = GeneralMethods.GetColor();
                ViewBag.Color = txtcolordesc;

                List <SelectListItem> ddlCustomers = new List <SelectListItem>();
                ddlCustomers      = VehReceiptMethods.GetDatafromSP("SP_Select_Customer", DealerCode);
                ViewBag.Customers = ddlCustomers;

                List <SelectListItem> ddlVehLoc = new List <SelectListItem>();
                ddlVehLoc         = GeneralMethods.GetDataFromSPWithDealerCode("SP_Select_VehLocation", DealerCode);
                ViewBag.ddlVehLoc = 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;
            }
            else
            {
                TempData["TestAccessError"] = MessageAlert.MsgAuthorized();
                return(RedirectToAction("Error", "Definition"));
            }



            return(View());
        }
Beispiel #9
0
        // 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());
        }
Beispiel #10
0
        // 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: 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());
        }
Beispiel #12
0
        // GET: DeliveryOrder
        public ActionResult DOMain(string EnquiryId = "")
        {
            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("NewLogin", "Home"));
            }
            if (common.UserRight("2501", "001"))
            {
                dealerCode = Session["DealerCode"].ToString();

                //List<SelectListItem> ddlRecNo = new List<SelectListItem>();
                //ddlRecNo = VehReceiptMethods.GetRecNo(dealerCode);
                //ViewBag.RecNo = ddlRecNo;

                //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();
                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<RequestVehicleReceiptVM> VehDetaillookUp = new List<RequestVehicleReceiptVM>();
                //VehDetaillookUp = DeliveryOrderMethods.GetProRecDetail(EnquiryId, Session["DealerCode"].ToString());
                //ViewBag.DetailLookup = VehDetaillookUp;

                List <SelectListItem> ddlAssignTo = new List <SelectListItem>();
                //ddlAssignTo = DeliveryOrderMethods.GetDealerEmployee(dealerCode);
                //ViewBag.AssignTo = ddlAssignTo;
                ddlAssignTo      = GeneralMethods.Get_DealerEmp(dealerCode);
                ViewBag.AssignTo = ddlAssignTo;
                List <SelectListItem> ddlVendor = new List <SelectListItem>();
                ddlVendor      = GeneralMethods.GetVendor();
                ViewBag.Vendor = ddlVendor;

                ViewBag.UrlLeadId = EnquiryId;
            }
            else
            {
                TempData["TestAccessError"] = MessageAlert.MsgAuthorized();
                return(RedirectToAction("Error", "Definition"));
            }
            return(View());
        }