// GET: BookingOrder
        public ActionResult BOMain(string EnquiryId = "")
        {
            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("Login", "Home"));
            }
            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_VehLocation", 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();
            ViewBag.Color = ddlColor;

            List <SelectListItem> ddlRecNo = new List <SelectListItem>();

            ddlRecNo      = VehReceiptMethods.GetRecNoList(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;

            @Session["ProdCode"] = string.Empty;

            ViewBag.UrlLeadId = EnquiryId;


            return(View());
        }