예제 #1
0
        public ActionResult PFRAWBAForm(string CC_NO)
        {
            using (var con = new SqlConnection(_connectionString))
            {
                ViewBag.ServiceProviderName = new SelectList(dropdown.BindServiceProvider(CurrentUser.CompanyId), "Value", "Text");
                ViewBag.CourierName         = new SelectList(dropdown.BindCourier(CurrentUser.CompanyId), "Value", "Text");
                ViewBag.CallStatus          = new SelectList(dropdown.BindCall_Status_Master(), "Value", "Text");
                var result = con.Query <ReverseAWB_AllocationModel>("GetDataIn_Reverse_AWB_Allocation",
                                                                    new { CC_NO = CC_NO }, commandType: CommandType.StoredProcedure).FirstOrDefault();

                var Problem = con.Query <GetProblem_Child_Order_problem>("GetProblem_From_Child_Order_problem",
                                                                         new { CC_NO }, commandType: CommandType.StoredProcedure).ToList();
                var finalValue = "";
                foreach (var item in Problem)
                {
                    var result1 = con.Query <string>("select Problem from mstdeviceproblem WHERE ProblemId =@ProblemId ", new { @ProblemId = item.ProblemId }, commandType: CommandType.Text).FirstOrDefault();

                    finalValue = finalValue + " , " + result1;
                }
                finalValue        = finalValue.Trim().TrimStart(',');
                result.Problem    = finalValue;
                result.CallStatus = result.CallStatus;
                return(View(result));
            }
        }
        public ActionResult Create()
        {
            ManageCourierApiModel courierApiModel = new ManageCourierApiModel
            {
                CountryList = new SelectList(dropdown.BindCountry(), "Value", "Text"),
                CourierList = new SelectList(dropdown.BindCourier(CurrentUser.CompanyId), "Value", "Text")
            };

            return(View(courierApiModel));
        }
        public async Task <ActionResult> POOWRRForm(string CcNO)
        {
            // ReceiveMaterials rm=new ReceiveMaterials
            using (var con = new SqlConnection(_connectionString))
            {
                var result = con.Query <ReceiveMaterials>("GetDataByCCNO",
                                                          new { CC_NO = CcNO }, commandType: CommandType.StoredProcedure).FirstOrDefault();

                //var Problem1 = con.Query<CourierValuesModel>("get_Customer_problem_New",
                //   new { CC_NO = CcNO }, commandType: CommandType.StoredProcedure).ToList();

                var Problem = con.Query <GetProblem_Child_Order_problem>("GetProblem_From_Child_Order_problem",
                                                                         new { CC_NO = CcNO }, commandType: CommandType.StoredProcedure).ToList();
                //var spareData = "";
                foreach (var item in Problem)
                {
                    var result1 = con.Query <string>("select Problem from mstdeviceproblem WHERE ProblemId =@ProblemId ", new { @ProblemId = item.ProblemId }, commandType: CommandType.Text).FirstOrDefault();
                    //var GetSpareType = con.Query<string>("select SpareId from Model_Problem_Spare_Price_Matrix Where BrandId=@BrandId and ModelId=@ModelId and ProblemId=@ProblemId ", new { @ProblemId = item.ProblemId, @BrandId=item.BrandId, @ModelId=item.ModelId }, commandType: CommandType.Text).FirstOrDefault();
                    item.ProblemName = result1;
                    //spareData = spareData + "," + GetSpareType;
                    // ViewBag.WS = new SelectList(dropdown.BindWarrantyDropdown(Convert.ToInt32(item.ModelId)), "Value", "Text");
                    result.WSList       = new System.Web.Mvc.SelectList(dropdown.BindWarrantyDropdown(Convert.ToInt32(item.ModelId)), "Value", "Text");
                    TempData["ModelID"] = item.ModelId;
                }
                if (Problem != null && Problem.Count > 0)
                {
                    result.ChildtableDataProblem = Problem;
                }
                else
                {
                    new List <GetProblem_Child_Order_problem>();
                }
                result.Problem = null;



                if (result.StatusName == "Pending")
                {
                    result.CurrentStatus = "Request received";
                }
                result.ProblemObservedList     = new SelectList(dropdown.BindProblemObserved(CurrentUser.CompanyId), "Value", "Text");
                result.SpareTypeList           = new SelectList(dropdown.BindMstDeviceProblemAbhishek(), "Value", "Text");
                result.SpareNameList           = new SelectList(Enumerable.Empty <SelectListItem>());
                result.SelectTrcList           = new SelectList(dropdown.BindTrc(), "Value", "Text");
                result.CourierNameList         = new SelectList(dropdown.BindCourier(CurrentUser.CompanyId), "Value", "Text");
                result.CallStatusList          = new SelectList(dropdown.BindCall_Status_Master(), "Value", "Text");
                result.ServiceProviderNameList = new SelectList(await CommonModel.GetServiceProviders(CurrentUser.CompanyId), "Name", "Text");
                result.ProblemList             = new SelectList(dropdown.BindMstDeviceProblem(), "Value", "Text");
                result.WSList = new SelectList(dropdown.BindWarrantyDropdown(Convert.ToInt32(TempData["ModelID"])), "Value", "Text");
                return(View(result));
            }
        }
예제 #4
0
        public ActionResult Create()
        {


            CourierPinZipCode courierPinZipCode = new CourierPinZipCode
            {
                CourierList = new SelectList(dropdown.BindCourier(CurrentUser.CompanyId), "Value", "Text"),
                CountryList = new SelectList(dropdown.BindCountry(), "Value", "Text"),
                StateList = new SelectList(Enumerable.Empty<SelectListItem>()),
                CityList = new SelectList(Enumerable.Empty<SelectListItem>())            
        };
        return View(courierPinZipCode);
    }
예제 #5
0
 public ActionResult PFBIForm()
 {
     ViewBag.ReceivedDevice = new SelectList(dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text");
     ViewBag.RecvdBrand     = new SelectList(dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text");
     ViewBag.RecvdModel     = new SelectList(dropdown.BindProduct(CurrentUser.CompanyId), "Value", "Text");
     ViewBag.Engg_Name      = new SelectList(dropdown.BindEngineer(CurrentUser.CompanyId), "Value", "Text");
     ViewBag.SpareType      = new SelectList(dropdown.BindSpareType(CurrentUser.CompanyId), "Value", "Text");
     ViewBag.SpareName      = new SelectList(Enumerable.Empty <SelectListItem>());
     ViewBag.ProblemFound   = new SelectList(dropdown.BindProblemObserved(CurrentUser.CompanyId), "Value", "Text");
     ViewBag.QCPersonName   = new SelectList(dropdown.BindEngineer(CurrentUser.CompanyId), "Value", "Text");
     ViewBag.QCFailReason   = new SelectList(dropdown.BindQC(CurrentUser.CompanyId), "Value", "Text");
     ViewBag.CourierID      = new SelectList(dropdown.BindCourier(CurrentUser.CompanyId), "Value", "Text");
     return(View());
 }
예제 #6
0
 public ActionResult EditRepairStatus1()
 {
     ViewBag.CourierName = new SelectList(dropdown.BindCourier(CurrentUser.CompanyId), "Value", "Text");
     ViewBag.PrblmObsrvd = new SelectList(dropdown.BindProblemObserved(CurrentUser.CompanyId), "Value", "Text");
     ViewBag.SpareType   = new SelectList(dropdown.BindSpareType(CurrentUser.CompanyId), "Value", "Text");
     ViewBag.SpareName   = new SelectList(Enumerable.Empty <SelectList>());
     return(View());
 }