public async Task <ActionResult> Create() { ManageStateModel st = new ManageStateModel { _CountryList = new SelectList(dropdown.BindCountry(), "Value", "Text") }; return(PartialView(st)); }
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 ActionResult AddSacCodes() { var SessionModel = Session["User"] as SessionModel; SacCodesModel sm = new SacCodesModel { CountryList = new SelectList(dropdown.BindCountry(), "Value", "Text"), StateList = new SelectList(Enumerable.Empty <SelectList>()), GstList = new SelectList(dropdown.BindGst(null), "Value", "Text"), AplicationTaxTypeList = new SelectList(CommonModel.GetApplicationTax(), "Value", "Text"), }; return(View(sm)); }
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); }
public ActionResult AddCityLocation() { ManageLocation ml = new ManageLocation(); ml._CountryList = new SelectList(Enumerable.Empty <SelectListItem>()); ml._StateList = new SelectList(Enumerable.Empty <SelectListItem>()); using (var con = new SqlConnection(_connectionString)) { ml._CountryList = new SelectList(dropdown.BindCountry(), "Value", "Text"); return(View(ml)); } }
public ActionResult AddGst() { GstTaxModel gm = new GstTaxModel(); gm.CountryList = new SelectList(dropdown.BindCountry(), "Value", "Text"); gm.StateList = new SelectList(Enumerable.Empty <SelectList>()); gm.GstcategoryList = new SelectList(dropdown.BindGst(null), "Value", "Text"); gm.DeviceCategoryList = new SelectList(dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text"); gm.DeviceSubCategoryList = new SelectList(Enumerable.Empty <SelectList>()); gm.ApplicableTaxTypeList = new SelectList(CommonModel.GetApplicationTax(), "Value", "Text"); gm.GstHSNCodeList = new SelectList(dropdown.BindGstHsnCode(), "Value", "Text"); gm.SACList = new SelectList(CommonModel.SAC_NumberList(), "Text", "Text"); gm.CTHNumberList = new SelectList(CommonModel.CTH_NumberList(), "Text", "Text"); return(View(gm)); }
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 }
public async Task <ActionResult> Create() { var empModel = new EmployeeModel(); empModel.DeginationList = new SelectList(await CommonModel.GetDesignations(), "Value", "Text"); empModel.DepartmentList = new SelectList(await CommonModel.GetDepartments(), "Value", "Text"); empModel.AddressTypelist = new SelectList(await CommonModel.GetLookup("ADDRESS"), "Value", "Text"); empModel.CountryList = new SelectList(drop.BindCountry(), "Value", "Text"); empModel.CityList = new SelectList(Enumerable.Empty <SelectList>()); empModel.LocationList = new SelectList(Enumerable.Empty <SelectListItem>()); empModel.StateList = new SelectList(Enumerable.Empty <SelectList>()); empModel.CenterList = new SelectList(Enumerable.Empty <SelectList>()); empModel.Vehicle.VehicleTypeList = new SelectList(await CommonModel.GetLookup("Vehicle"), "Value", "Text"); empModel.EngineerTypeList = new SelectList(await CommonModel.GetLookup("Engineer Type"), "Value", "Text"); if (CurrentUser.UserTypeName.ToLower().Contains("provider")) { empModel.IsProvider = true; if (CurrentUser.UserRole.Contains("Service Provider SC Admin")) { empModel.ProviderId = CurrentUser.RefKey; } else { empModel.CenterList = new SelectList(await CommonModel.GetServiceCenters(CurrentUser.RefKey), "Name", "Text"); } } else if (CurrentUser.UserTypeName.ToLower().Contains("center")) { empModel.RefKey = CurrentUser.RefKey; empModel.IsCenter = true; empModel.ProviderList = new SelectList(Enumerable.Empty <SelectList>()); } else { empModel.ProviderList = new SelectList(await CommonModel.GetServiceProviders(CurrentUser.CompanyId), "Name", "Text"); } return(View(empModel)); }
public async Task <ActionResult> Create() { var CompanyData = new CompanyModel(); CompanyData.Path = _path; CompanyData.ActiveTab = "tab-1"; CompanyData.Action = 'I'; CompanyData.CompanyTypeList = new SelectList(await CommonModel.GetLookup("Company Type"), "Value", "Text"); CompanyData.Organization.GstCategoryList = new SelectList(await CommonModel.GetGstCategory(), "Value", "Text"); CompanyData.Organization.AplicationTaxTypeList = new SelectList(await CommonModel.GetLookup("Application Tax Type"), "Value", "Text"); CompanyData.Organization.StatutoryList = new SelectList(await CommonModel.GetLookup("Statutory Type"), "Value", "Text"); CompanyData.BankDetail.BankList = new SelectList(await CommonModel.GetLookup("Bank"), "Value", "Text"); CompanyData.Contact.AddressTypelist = new SelectList(await CommonModel.GetLookup("Address"), "value", "Text"); CompanyData.Contact.CountryList = new SelectList(_dropdown.BindCountry(), "Value", "Text"); CompanyData.Contact.StateList = new SelectList(Enumerable.Empty <SelectList>()); CompanyData.Contact.CityList = new SelectList(Enumerable.Empty <SelectList>()); CompanyData.Contact.LocationList = new SelectList(Enumerable.Empty <SelectListItem>()); CompanyData.Agreement.ServiceList = await CommonModel.GetServiceType(new FilterModel()); CompanyData.Agreement.DeliveryServiceList = await CommonModel.GetDeliveryServiceType(new FilterModel()); return(View(CompanyData)); }
public async Task <ActionResult> Create() { DropdownBindController drop = new DropdownBindController(); ManageCourierModel courierModel = new ManageCourierModel { CountryList = new SelectList(dropdown.BindCountry(), "Value", "Text"), StateList = new SelectList(Enumerable.Empty <SelectListItem>()), CityList = new SelectList(Enumerable.Empty <SelectListItem>()), PincodeList = new SelectList(Enumerable.Empty <SelectListItem>()), ApplicableTaxTypeList = new SelectList(await CommonModel.GetApplicationTaxType(), "Value", "Text"), PersonAddressTypeList = new SelectList(CommonModel.GetAddressTypes(), "Value", "Text"), AWBNumberUsedList = new SelectList(await CommonModel.GetAWBNumberUsedTypes(), "Value", "Text"), AgreementSignupList = new SelectList(await CommonModel.GetAgreementSignup(), "Value", "Text"), LegalDocumentVerificationList = new SelectList(await CommonModel.GetLegalDocumentVerification(), "Value", "Text") }; return(View(courierModel)); }
private async Task <ClientModel> GetClient(Guid?clientId) { var Client = await _client.GetClientByClientId(clientId); Client.Path = _path; if (Client.Organization == null) { Client.Organization = new OrganizationModel(); } Client.Organization.GstCategoryList = new SelectList(dropdown.BindGst(null), "Value", "Text"); var statutory = await CommonModel.GetStatutoryType(); Client.Organization.StatutoryList = new SelectList(statutory, "Value", "Text"); var applicationTaxTypeList = await CommonModel.GetApplicationTaxType(); Client.Organization.AplicationTaxTypeList = new SelectList(applicationTaxTypeList, "Value", "Text"); Client.Bank.BankList = new SelectList(await CommonModel.GetLookup("Bank"), "Value", "Text"); Client.Contact.AddressTypelist = new SelectList(await CommonModel.GetLookup("Address"), "value", "Text"); Client.Contact.CountryList = new SelectList(dropdown.BindCountry(), "Value", "Text"); Client.Contact.StateList = new SelectList(Enumerable.Empty <SelectList>()); Client.Contact.CityList = new SelectList(Enumerable.Empty <SelectList>()); Client.Contact.LocationList = new SelectList(Enumerable.Empty <SelectList>()); Client.Service = new ServiceViewModel { SupportedCategoryList = new SelectList(dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text"), SupportedSubCategoryList = new SelectList(Enumerable.Empty <SelectList>()), ServiceList = new SelectList(await doorserve.CommonModel.GetServiceType(new FilterModel { CompId = CurrentUser.CompanyId }), "Value", "Text"), DeliveryServiceList = new SelectList(await doorserve.CommonModel.GetDeliveryServiceType(new FilterModel { CompId = CurrentUser.CompanyId }), "Value", "Text"), RefKey = clientId }; if (CurrentUser.UserTypeName.ToLower().Contains("super admin")) { Client.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text"); if (Client.CompanyId != null) { Client.ProcessList = new SelectList(await CommonModel.GetProcesses(Client.CompanyId), "Value", "Text"); } else { Client.ProcessList = new SelectList(Enumerable.Empty <SelectList>()); } Client.IsSuperAdmin = true; } else { Client.CompanyList = new SelectList(Enumerable.Empty <SelectList>()); if (clientId == null) { Client.ProcessList = new SelectList(await CommonModel.GetProcesses(CurrentUser.CompanyId), "Value", "Text"); Client.CompanyId = CurrentUser.CompanyId; } else { Client.ProcessList = new SelectList(await CommonModel.GetProcesses(Client.CompanyId), "Value", "Text"); } } if (clientId != null) { Client.action = 'U'; } else { Client.action = 'I'; } return(Client); }
private async Task <ServiceCenterModel> GetCenter(Guid?centerId) { var Center = await _Center.GetCenterById(centerId); Center.Path = _path; if (CurrentUser.UserRole.ToLower().Contains("provider")) { var providerId = CurrentUser.RefKey; var provider = await _Provider.GetProviderById(providerId); Center.IsProvider = true; } else if (CurrentUser.UserRole.ToLower().Contains("company")) { Center.IsCompany = true; Center.ProviderList = new SelectList(await CommonModel.GetServiceProviders(CurrentUser.CompanyId), "Name", "Text"); } else { Center.IsProvider = false; Center.IsCompany = false; Center.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text"); if (Center.CenterId != null) { Center.ProviderList = new SelectList(await CommonModel.GetServiceProviders(Center.CompanyId), "Name", "Text"); } else { Center.ProviderList = new SelectList(Enumerable.Empty <SelectList>()); } } if (Center.Organization == null) { Center.Organization = new OrganizationModel(); } Center.SupportedCategoryList = new SelectList(dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text"); Center.Organization.GstCategoryList = new SelectList(dropdown.BindGst(null), "Value", "Text"); var statutory = await CommonModel.GetStatutoryType(); Center.Organization.StatutoryList = new SelectList(statutory, "Value", "Text"); var applicationTaxTypeList = await CommonModel.GetApplicationTaxType(); Center.Organization.AplicationTaxTypeList = new SelectList(applicationTaxTypeList, "Value", "Text"); Center.ServiceList = await doorserve.CommonModel.GetServiceType(new FilterModel { CompId = CurrentUser.CompanyId, RefKey = Center.CenterId }); Center.DeliveryServiceList = await doorserve.CommonModel.GetDeliveryServiceType(new FilterModel { CompId = CurrentUser.CompanyId, RefKey = Center.CenterId }); Center.Bank.BankList = new SelectList(await CommonModel.GetLookup("Bank"), "Value", "Text"); Center.Contact.AddressTypelist = new SelectList(await CommonModel.GetLookup("Address"), "value", "Text"); Center.Contact.CountryList = new SelectList(dropdown.BindCountry(), "Value", "Text"); Center.Contact.StateList = new SelectList(Enumerable.Empty <SelectList>()); Center.Contact.CityList = new SelectList(Enumerable.Empty <SelectList>()); Center.Contact.LocationList = new SelectList(Enumerable.Empty <SelectListItem>()); if (centerId != null) { Center.action = 'U'; } else { Center.action = 'I'; } List <int> List = new List <int>(); if (!string.IsNullOrEmpty(Center._deviceCategories)) { var _deviceCat = Center._deviceCategories.Split(','); for (int i = 0; i < _deviceCat.Length; i++) { List.Add(Convert.ToInt16(_deviceCat[i])); } } if (!string.IsNullOrEmpty(Center.ServiceDeliveryTypes)) { var _DeliveryService = Center.ServiceDeliveryTypes.Split(','); for (int i = 0; i < _DeliveryService.Length; i++) { var item = Center.DeliveryServiceList.Where(x => x.Value == Convert.ToInt32(_DeliveryService[i])).FirstOrDefault(); if (item != null) { item.IsChecked = true; } } } if (!string.IsNullOrEmpty(Center.ServiceTypes)) { var _serviceType = Center.ServiceTypes.Split(','); for (int i = 0; i < _serviceType.Length; i++) { var item = Center.ServiceList.Where(x => x.Value == Convert.ToInt32(_serviceType[i])).FirstOrDefault(); if (item != null) { item.IsChecked = true; } } } Center.DeviceCategories = List; return(Center); }
public async Task <ActionResult> AddorEditServiceProvider(ServiceProviderModel provider) { var statutory = await CommonModel.GetStatutoryType(); var applicationTaxTypeList = await CommonModel.GetApplicationTaxType(); var cltns = TempData["provider"] as ServiceProviderModel; provider.Organization = new OrganizationModel(); provider.Organization.GstCategoryList = new SelectList(dropdown.BindGst(null), "Value", "Text"); provider.Organization.StatutoryList = new SelectList(statutory, "Value", "Text"); provider.Organization.AplicationTaxTypeList = new SelectList(applicationTaxTypeList, "Value", "Text"); provider.Bank.BankList = new SelectList(await CommonModel.GetLookup("Bank"), "Value", "Text"); provider.Contact.AddressTypelist = new SelectList(await CommonModel.GetLookup("Address"), "value", "Text"); provider.Contact.CountryList = new SelectList(dropdown.BindCountry(), "Value", "Text"); provider.Contact.StateList = new SelectList(dropdown.BindState(), "Value", "Text"); provider.Contact.CityList = new SelectList(await CommonModel.GetLookup("City"), "Value", "Text"); //provider.Contact.LocationList = new SelectList(dropdown.BindLocation(), "Value", "Text"); provider.Contact.LocationList = new SelectList(dropdown.BindLocationByPinCode(provider.Contact.PinNumber), "Value", "Text"); provider.Service = new ServiceOfferedModel { SupportedCategoryList = new SelectList(dropdown.BindCategory(CurrentUser.CompanyId), "Value", "Text"), SupportedSubCategoryList = new SelectList(dropdown.BindCountry(), "Value", "Text"), ServiceList = new SelectList(await doorserve.CommonModel.GetServiceType(new FilterModel { CompId = CurrentUser.CompanyId }), "Value", "Text"), DeliveryServiceList = new SelectList(await doorserve.CommonModel.GetDeliveryServiceType(new FilterModel { CompId = CurrentUser.CompanyId }), "Value", "Text"), LocationList = new SelectList(Enumerable.Empty <SelectList>()), }; if (TempData["provider"] != null) { cltns.CompanyId = provider.CompanyId; provider = cltns; } else { provider.Activetab = "tab-1"; provider.CreatedBy = CurrentUser.UserId; } if (CurrentUser.UserTypeName.ToLower().Contains("super admin")) { provider.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text"); provider.IsSuperAdmin = true; } else { provider.CompanyId = CurrentUser.CompanyId; } provider.UserId = CurrentUser.UserId; provider.Activetab = "tab-1"; var response = await _provider.AddUpdateDeleteProvider(provider); _provider.Save(); provider.ProviderId = new Guid(response.result); provider.Service.RefKey = provider.ProviderId; TempData["response"] = response; provider.Activetab = "tab-2"; if (provider.action == 'I') { TempData["provider"] = provider; return(View("Create", provider)); } else { return(View("Edit", provider)); } }