public ActionResult AddServiceCharge()
        {
            ServiceChargeModel scm = new ServiceChargeModel();

            scm.DeviceCategoryList    = new SelectList(dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text");
            scm.DeviceSubCategoryList = new SelectList(Enumerable.Empty <SelectListItem>());
            scm.BrandList             = new SelectList(dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text");
            scm.ModelNameList         = new SelectList(Enumerable.Empty <SelectListItem>());
            return(View(scm));
        }
예제 #2
0
 public ActionResult PFPForm()
 {
     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   = ViewBag.Engg_Name;
     ViewBag.QCFailReason   = new SelectList(dropdown.BindQC(CurrentUser.CompanyId), "Value", "Text");
     return(View());
 }
예제 #3
0
        public ActionResult AddSparePartName()
        {
            var sparepart = new ManageSparePart();

            sparepart.CTHNoList           = new SelectList(dropdown.BindGstHsnCode(), "Value", "Text");
            sparepart.CategoryList        = new SelectList(dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text");
            sparepart.BrandList           = new SelectList(dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text");
            sparepart.DeviceModelNameList = new SelectList(dropdown.BindProduct(sparepart.BrandId), "Value", "Text");
            sparepart.SpareTypeIdList     = new SelectList(dropdown.BindSpareType(CurrentUser.CompanyId), "Value", "Text");
            sparepart.SubCategoryList     = new SelectList(dropdown.BindSubCategory(sparepart.CategoryId), "Value", "Text");

            return(PartialView(sparepart));
        }
        public async Task <ActionResult> Index()
        {
            ViewBag.PageNumber = (Request.QueryString["grid-page"] == null) ? "1" : Request.QueryString["grid-page"];
            bool IsClient = false;
            var  filter   = new FilterModel {
                CompId = CurrentUser.CompanyId
            };

            if (CurrentUser.UserTypeName.ToLower().Contains("client"))
            {
                filter.ClientId = CurrentUser.RefKey;
                filter.RefKey   = CurrentUser.RefKey;
                IsClient        = true;
            }
            var clientData  = new MainClientDataModel();
            var serviceType = await CommonModel.GetServiceType(filter);

            var deliveryType = await CommonModel.GetDeliveryServiceType(filter);

            clientData.Client                  = new FileDetailModel();
            clientData.Client.IsClient         = IsClient;
            clientData.Client.ClientId         = filter.ClientId;
            clientData.Client.ClientList       = new SelectList(await CommonModel.GetClientData(CurrentUser.CompanyId), "Name", "Text");
            clientData.Client.ServiceTypeList  = new SelectList(serviceType, "Value", "Text");
            clientData.Client.DeliveryTypeList = new SelectList(deliveryType, "Value", "Text");
            // new call Log
            clientData.NewCallLog = new CallDetailsModel
            {
                DataSourceId     = 101,
                IsAssingedCall   = true,
                ClientList       = clientData.Client.ClientList,
                ServiceTypeList  = clientData.Client.ServiceTypeList,
                DeliveryTypeList = clientData.Client.DeliveryTypeList,
                BrandList        = new SelectList(_dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text"),
                CategoryList     = new SelectList(_dropdown.BindCategory(filter), "Value", "Text"),
                SubCategoryList  = new SelectList(Enumerable.Empty <SelectListItem>()),
                ProductList      = new SelectList(Enumerable.Empty <SelectListItem>()),
                CustomerTypeList = new SelectList(await CommonModel.GetLookup("Customer Type"), "Value", "Text"),
                ConditionList    = new SelectList(await CommonModel.GetLookup("Device Condition"), "Value", "Text"),
                IsClient         = IsClient,
                StatusList       = new SelectList(await CommonModel.GetStatusTypes("Client"), "Value", "Text"),
                // address=new AddressDetail
                //{
                AddressTypelist = new SelectList(await CommonModel.GetLookup("ADDRESS"), "Value", "Text"),
                LocationList    = new SelectList(Enumerable.Empty <SelectListItem>()),

                // }
            };
            clientData.tab_index = "tab-5";
            return(View(clientData));
        }
        public ActionResult PRCCForm()
        {
            var ReceiveMaterial = new ReceiveMaterials();

            ReceiveMaterial.ReceivedDeviceList = new SelectList(dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text");
            ReceiveMaterial.RecvdBrandlList    = new SelectList(dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text");
            ReceiveMaterial.RecvdModelList     = new SelectList(dropdown.BindProduct(CurrentUser.CompanyId), "Value", "Text");
            ReceiveMaterial.Engg_NameList      = new SelectList(dropdown.BindEngineer(CurrentUser.CompanyId), "Value", "Text");
            ReceiveMaterial.SpareTypeList      = new SelectList(dropdown.BindSpareType(CurrentUser.CompanyId), "Value", "Text");
            ReceiveMaterial.SpareNameList      = new SelectList(Enumerable.Empty <SelectListItem>());
            ReceiveMaterial.ProblemFoundList   = new SelectList(dropdown.BindProblemObserved(CurrentUser.CompanyId), "Value", "Text");



            return(PartialView(ReceiveMaterial));
        }
        public async Task <ActionResult> Create()
        {
            var filter = new FilterModel {
                CompId = CurrentUser.CompanyId, IsExport = false
            };
            // var Newcalls = await _customerSupport.GetASPCalls(filter);
            var Newcalls = new CallDetailsModel();

            Newcalls.ServiceTypeList = new SelectList(await CommonModel.GetServiceType(filter), "Value", "Text");

            // IsAssingedCall = true,
            Newcalls.DeliveryTypeList = new SelectList(await CommonModel.GetDeliveryServiceType(filter), "Value", "Text");
            Newcalls.BrandList        = new SelectList(_dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text");
            Newcalls.CategoryList     = new SelectList(_dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text");
            Newcalls.SubCategoryList  = new SelectList(Enumerable.Empty <SelectListItem>());
            Newcalls.ProductList      = new SelectList(Enumerable.Empty <SelectListItem>());
            Newcalls.CustomerTypeList = new SelectList(await CommonModel.GetLookup("Customer Type"), "Value", "Text");
            Newcalls.ConditionList    = new SelectList(await CommonModel.GetLookup("Device Condition"), "Value", "Text");
            // calls.IsClient = IsClient,
            Newcalls.StatusList      = new SelectList(await CommonModel.GetStatusTypes("Customer support"), "Value", "Text");
            Newcalls.AddressTypelist = new SelectList(await CommonModel.GetLookup("ADDRESS"), "Value", "Text");
            Newcalls.LocationList    = new SelectList(Enumerable.Empty <SelectListItem>());
            //Newcalls.ClientId = 101;
            Newcalls.DataSourceId = 102;
            return(View(Newcalls));
        }
        public ActionResult PFRMAForm()
        {
            var SessionModel = Session["User"] as SessionModel;

            ViewBag.ReceivedDevice = new SelectList(dropdown.BindCategory(SessionModel.CompanyId), "Value", "Text");
            ViewBag.RecvdBrand     = new SelectList(dropdown.BindBrand(SessionModel.CompanyId), "Value", "Text");
            ViewBag.RecvdModel     = new SelectList(dropdown.BindProduct(SessionModel.CompanyId), "Value", "Text");
            ViewBag.EnggName       = new SelectList(dropdown.BindEngineer(SessionModel.CompanyId), "Value", "Text");
            return(View());
        }
예제 #8
0
        public async Task <ActionResult> Edit(string CRN)
        {
            var filter = new FilterModel {
                CompId = CurrentUser.CompanyId
            };
            var CalAppintmentModel = await _centerRepo.GetCallsDetailsById(CRN);

            CalAppintmentModel.BrandList        = new SelectList(_dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text");
            CalAppintmentModel.CategoryList     = new SelectList(_dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text");
            CalAppintmentModel.ProductList      = new SelectList(_dropdown.BindProduct(CalAppintmentModel.DeviceBrandId), "Value", "Text");
            CalAppintmentModel.ServiceTypeList  = new SelectList(await CommonModel.GetServiceType(filter), "Value", "Text");
            CalAppintmentModel.DeliveryTypeList = new SelectList(await CommonModel.GetDeliveryServiceType(filter), "Value", "Text");
            CalAppintmentModel.CustomerTypeList = new SelectList(await CommonModel.GetLookup("Customer Type"), "Value", "Text");
            CalAppintmentModel.ConditionList    = new SelectList(await CommonModel.GetLookup("Device Condition"), "Value", "Text");
            CalAppintmentModel.AddressTypelist  = new SelectList(await CommonModel.GetLookup("Address"), "Value", "Text");
            CalAppintmentModel.CountryList      = new SelectList(_dropdown.BindCountry(), "Value", "Text");
            CalAppintmentModel.StatusList       = new SelectList(_dropdown.BindCallStatusNew(), "Value", "Text");
            return(PartialView(Mapper.Map <CallDetailsModel>(CalAppintmentModel)));
            //UpdateAppointmentDetail
        }
예제 #9
0
        public ActionResult RM()
        {
            var SessionModel     = Session["User"] as SessionModel;
            var receivematerials = new ReceiveMaterials();

            receivematerials.ReceivedDeviceList = new SelectList(dropdown.BindCategory(SessionModel.CompanyId), "Value", "Text");
            receivematerials.RecvdBrandlList    = new SelectList(dropdown.BindBrand(SessionModel.CompanyId), "Value", "Text");
            receivematerials.RecvdModelList     = new SelectList(Enumerable.Empty <SelectListItem>());
            receivematerials.Engg_NameList      = new SelectList(dropdown.BindEngineer(SessionModel.CompanyId), "Value", "Text");
            return(PartialView(receivematerials));
        }
        public ActionResult AddSparePartsPriceandStock()
        {
            //using (var con = new SqlConnection(_connectionString))
            //{
            //    var result = con.Query<SparePartsPriceStockModel>("GetSparePriceData",
            //            new{ID=1}, commandType: CommandType.StoredProcedure).FirstOrDefault();


            //    return View(result);
            //}
            var sparepartspricestock = new SparePartsPriceStockModel();

            sparepartspricestock.CatNameList       = new SelectList(dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text");
            sparepartspricestock.SubCatNameList    = new SelectList(Enumerable.Empty <SelectListItem>());
            sparepartspricestock.BrandList         = new SelectList(dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text");
            sparepartspricestock.ProductNameList   = new SelectList(Enumerable.Empty <SelectListItem>());
            sparepartspricestock.PartNameList      = new SelectList(Enumerable.Empty <SelectListItem>());
            sparepartspricestock.SpareTypeNameList = new SelectList(dropdown.BindSpareType(CurrentUser.CompanyId), "Value", "Text");
            return(PartialView(sparepartspricestock));
        }
예제 #11
0
        public ActionResult PFRForm()
        {
            var SessionModel = Session["User"] as SessionModel;

            ViewBag.ReceivedDevice = new SelectList(dropdown.BindCategory(SessionModel.CompanyId), "Value", "Text");
            ViewBag.RecvdBrand     = new SelectList(dropdown.BindBrand(SessionModel.CompanyId), "Value", "Text");
            ViewBag.RecvdModel     = new SelectList(dropdown.BindProduct(SessionModel.CompanyId), "Value", "Text");
            ViewBag.Engg_Name      = new SelectList(dropdown.BindEngineer(SessionModel.CompanyId), "Value", "Text");
            ViewBag.SpareType      = new SelectList(dropdown.BindSpareType(SessionModel.CompanyId), "Value", "Text");
            ViewBag.SpareName      = new SelectList(Enumerable.Empty <SelectListItem>());
            ViewBag.ProblemFound   = new SelectList(dropdown.BindProblemObserved(SessionModel.CompanyId), "Value", "Text");
            ViewBag.QCPersonName   = ViewBag.Engg_Name;
            return(View());
        }
예제 #12
0
        public ActionResult AddProduct()
        {
            using (var con = new SqlConnection(_connectionString))
            {
                ProductModel pm = new ProductModel {
                    _BrandName    = new SelectList(dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text"),
                    _Category     = new SelectList(dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text"),
                    _ProductColor = new SelectList(dropdown.BindProductColor(null), "Value", "Text"),
                    _SubCat       = new SelectList(Enumerable.Empty <SelectList>())
                };

                return(PartialView(pm));
            }
        }
예제 #13
0
        public async Task <ActionResult> ManageServiceProvidersDetails(string CRN, string Param)
        {
            var CallDetailsModel = await _centerRepo.GetCallsDetailsById(CRN);

            CallDetailsModel.BrandList       = new SelectList(_dropdown.BindBrand(CurrentUser.CompanyId), "Value", "Text");
            CallDetailsModel.CategoryList    = new SelectList(_dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text");
            CallDetailsModel.SubCategoryList = new SelectList(_dropdown.BindSubCategory(CallDetailsModel.DeviceCategoryId), "Value", "Text");
            CallDetailsModel.ProductList     = new SelectList(_dropdown.BindProduct(CallDetailsModel.DeviceBrandId.ToString() + "," + CallDetailsModel.DeviceSubCategoryId.ToString()), "Value", "Text");
            CallDetailsModel.ServiceTypeList = new SelectList(await CommonModel.GetServiceType(new FilterModel {
                CompId = CallDetailsModel.CompanyId, RefKey = CallDetailsModel.ClientId
            }), "Value", "Text");
            CallDetailsModel.DeliveryTypeList = new SelectList(await CommonModel.GetDeliveryServiceType(new FilterModel {
                CompId = CallDetailsModel.CompanyId, RefKey = CallDetailsModel.ClientId
            }), "Value", "Text");
            CallDetailsModel.CustomerTypeList = new SelectList(await CommonModel.GetLookup("Customer Type"), "Value", "Text");
            CallDetailsModel.ConditionList    = new SelectList(await CommonModel.GetLookup("Device Condition"), "Value", "Text");
            CallDetailsModel.AddressTypelist  = new SelectList(await CommonModel.GetLookup("Address"), "Value", "Text");
            CallDetailsModel.LocationList     = new SelectList(dropdown.BindLocationByPinCode(CallDetailsModel.PinNumber), "Value", "Text");
            var providerList = dropdown.BindServiceProvider(CallDetailsModel.PinNumber, CRN);

            CallDetailsModel.CompLogo = CurrentUser.LogoUrl;
            if (Convert.ToBoolean(CallDetailsModel.IsRepeat))
            {
                var prvList = providerList.Where(x => x.Value == CallDetailsModel.PrvProviderId.ToString()).ToList();
                if (prvList != null)
                {
                    CallDetailsModel.ProviderList = new SelectList(prvList, "Value", "Text");
                }
                else
                {
                    CallDetailsModel.ProviderList = new SelectList(dropdown.BindServiceProvider(CallDetailsModel.PinNumber, CRN), "Value", "Text");
                }
            }
            else
            {
                CallDetailsModel.ProviderList = new SelectList(dropdown.BindServiceProvider(CallDetailsModel.PinNumber, CRN), "Value", "Text");
            }
            CallDetailsModel.Param = Param;
            CallDetailsModel.Files = new List <ProviderFileModel>();
            if (Param == "A")
            {
                if (CallDetailsModel.EmpId != null)
                {
                    CallDetailsModel.Employee = await _empRepo.GetEmployeeById(CallDetailsModel.EmpId);
                }
                else
                {
                    CallDetailsModel.Employee = new EmployeeModel();
                }
                CallDetailsModel.StatusList        = new SelectList(dropdown.BindCallAppointmentStatus("ASP"), "Value", "Text");
                CallDetailsModel.AppointmentStatus = CallDetailsModel.ASPStatus;
                CallDetailsModel.Remarks           = CallDetailsModel.AspRemark;
            }
            else
            {
                if (Param == "P")
                {
                    CallDetailsModel.CStatus = 11;
                }
                CallDetailsModel.AppointmentStatus = CallDetailsModel.CStatus;
                CallDetailsModel.StatusList        = new SelectList(dropdown.BindCallAppointmentStatus("Customer support"), "Value", "Text");
                CallDetailsModel.Remarks           = CallDetailsModel.CRemark;
            }
            if (CurrentUser.UserTypeName.ToLower().Contains("company"))
            {
                CallDetailsModel.IsCompany = true;
            }

            return(View(CallDetailsModel));
        }