public async Task <ActionResult> Edit(int id, Guid?GUID)
        {
            var templatemodel = new TemplateModel();

            templatemodel = await _templateRepo.GetTemplateByGUID(id, GUID);

            if (!string.IsNullOrEmpty(templatemodel.ScheduleDateTime))
            {
                string[] strSheduleArray = templatemodel.ScheduleDateTime.Split(' ');
                templatemodel.ScheduleDate = strSheduleArray[0];
                templatemodel.ScheduleTime = strSheduleArray[1];
            }

            templatemodel.WildCardList          = new SelectList(CommonModel.GetWildCards(templatemodel.CompanyId), "Text", "Text");
            templatemodel.ActionTypeList        = new SelectList(await CommonModel.GetActionTypes(), "Value", "Text");
            templatemodel.MessageTypeList       = new SelectList(await CommonModel.GetLookup("Gateway"), "Value", "Text");
            templatemodel.TemplateTypeList      = new SelectList(await CommonModel.GetLookup("Template"), "Value", "Text");
            templatemodel.PriorityTypeList      = new SelectList(await CommonModel.GetLookup("Priority"), "Value", "Text");
            templatemodel.EmailHeaderFooterList = new SelectList(CommonModel.GetHeaderFooter(templatemodel.CompanyId), "Value", "Text");
            templatemodel.GatewayList           = new SelectList(CommonModel.GetMailerGatewayList(templatemodel.MessageTypeId, templatemodel.CompanyId), "GatewayId", "GatewayName");
            if (CurrentUser.UserTypeName.ToLower() == "super admin")
            {
                templatemodel.IsAdmin     = true;
                templatemodel.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
            }
            return(View(templatemodel));
        }
        public async Task <ActionResult> Index()


        {
            var getwaylist = await CommonModel.GetGatewayType();


            var getwayTypeId = getwaylist.Where(x => x.Text == "Notification Gateway").Select(x => x.Value).SingleOrDefault();

            var notificationgateway = await _gatewayRepo.GetGatewayByType(new Filters.FilterModel {
                GatewayTypeId = getwayTypeId, CompId = CurrentUser.CompanyId
            });

            NotificationGateWayMainModel model = new NotificationGateWayMainModel();

            model.Gateway = new NotificationGatewayModel();
            if (CurrentUser.UserTypeName.ToLower() == "super admin")
            {
                model.Gateway.IsAdmin     = true;
                model.Gateway.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
            }
            model.mainModel             = Mapper.Map <List <NotificationGatewayModel> >(notificationgateway);
            model.Gateway.GatewayTypeId = getwayTypeId;
            model.Gateway.GatewayList   = new SelectList(notificationgateway, "GatewayId", "GatewayName");

            return(View(model));
        }
        public async Task <ActionResult> Edit(int ProcessId)
        {
            var Pro = await _Process.GetProcessesById(ProcessId);

            if (CurrentUser.UserTypeName.ToLower() == "super admin")
            {
                Pro.IsAdmin     = true;
                Pro.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
            }
            return(View(Pro));
        }
        public async Task <ActionResult> Create()
        {
            var process = new ProcessModel();

            if (CurrentUser.UserTypeName.ToLower() == "super admin")
            {
                process.IsAdmin     = true;
                process.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
            }
            return(View(process));
        }
示例#5
0
        public async Task <ActionResult> Create()
        {
            var smtpgatewaymodel = new SMTPGatewayModel();

            if (CurrentUser.UserTypeName.ToLower() == "super admin")
            {
                smtpgatewaymodel.IsAdmin     = true;
                smtpgatewaymodel.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
            }
            return(View(smtpgatewaymodel));
        }
        public async Task <ActionResult> Create()
        {
            ManageRegionModel MR = new ManageRegionModel();

            MR.StateList = new SelectList(_Dropdown.BindState(), "Value", "Text");
            if (CurrentUser.UserTypeName.ToLower() == "super admin")
            {
                MR.IsAdmin     = true;
                MR.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
            }
            return(View(MR));
        }
        public async Task <ActionResult> Create()
        {
            var wildcardmodel = new WildCardModel();

            wildcardmodel.ActionTypeList = new SelectList(await CommonModel.GetActionTypes(), "Value", "Text");
            if (CurrentUser.UserTypeName.ToLower() == "super admin")
            {
                wildcardmodel.IsAdmin     = true;
                wildcardmodel.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
            }
            return(View(wildcardmodel));
        }
示例#8
0
        public async Task <ActionResult> Edit(int id)
        {
            var GatewayModel = await _gatewayRepo.GetGatewayById(id);

            var SmtpGatewayModel = Mapper.Map <SMTPGatewayModel>(GatewayModel);

            if (CurrentUser.UserTypeName.ToLower() == "super admin")
            {
                SmtpGatewayModel.IsAdmin     = true;
                SmtpGatewayModel.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
            }
            return(View(SmtpGatewayModel));
        }
        public async Task <ActionResult> Create()
        {
            var templatemodel = new TemplateModel();

            templatemodel.IsActive              = true;
            templatemodel.ActionTypeList        = new SelectList(await CommonModel.GetActionTypes(), "Value", "Text");
            templatemodel.MessageTypeList       = new SelectList(await CommonModel.GetLookup("Gateway"), "Value", "Text");
            templatemodel.TemplateTypeList      = new SelectList(await CommonModel.GetLookup("Template"), "Value", "Text");
            templatemodel.PriorityTypeList      = new SelectList(await CommonModel.GetLookup("Priority"), "Value", "Text");
            templatemodel.WildCardList          = new SelectList(CommonModel.GetWildCards(CurrentUser.CompanyId), "Text", "Text");
            templatemodel.EmailHeaderFooterList = new SelectList(CommonModel.GetHeaderFooter(CurrentUser.CompanyId), "Value", "Text");
            templatemodel.IsSystemDefined       = true;
            if (CurrentUser.UserTypeName.ToLower() == "super admin")
            {
                templatemodel.IsAdmin     = true;
                templatemodel.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
            }
            return(View(templatemodel));
        }
示例#10
0
        public async Task <ActionResult> Index()
        {
            var emailheaderfooter = await _emailHeaderFooterRepo.GetEmailHeaderFooters(new Filters.FilterModel {
                CompId = CurrentUser.CompanyId
            });

            EmailHeaderFooterMainModel model = new EmailHeaderFooterMainModel();

            model.EmailHeaderFooter = new EmailHeaderFooterModel();
            model.mainModel         = Mapper.Map <List <EmailHeaderFooterModel> >(emailheaderfooter);
            model.EmailHeaderFooter.ActionTypeList = new SelectList(await CommonModel.GetActionTypes(), "Value", "Text");
            if (CurrentUser.UserTypeName.ToLower() == "super admin")
            {
                model.EmailHeaderFooter.IsAdmin     = true;
                model.EmailHeaderFooter.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
            }


            return(View(model));
        }
        public async Task <ActionResult> Edit(int id)
        {
            var wildcard = await _wildCardRepo.GetWildCardByWildCardId(id);

            var        array       = wildcard.ActionTypeIds.Split(',');
            List <int> ActionTypes = new List <int>();

            for (int i = 0; i < array.Length; i++)
            {
                ActionTypes.Add(Convert.ToInt32(array[i]));
            }
            wildcard.ActionTypeList = new SelectList(await CommonModel.GetActionTypes(), "Value", "Text");
            wildcard.actionTypes    = ActionTypes;
            if (CurrentUser.UserTypeName.ToLower() == "super admin")
            {
                wildcard.IsAdmin     = true;
                wildcard.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
            }
            return(View(wildcard));
        }
        public async Task <ActionResult> Edit(Guid RegionId)
        {
            var Region = await _Region.GetRegionById(RegionId);

            var selectedItems = new List <int>();

            if (Region.StateXml != null)
            {
                var states = Deserialize <List <StateModel> >(Region.StateXml);

                foreach (var item in states)
                {
                    selectedItems.Add(Convert.ToInt32(item.St_ID));
                }
            }
            Region.StateList      = new SelectList(_Dropdown.BindState(), "Value", "Text");
            Region.SelectedStates = selectedItems;
            if (CurrentUser.UserTypeName.ToLower() == "super admin")
            {
                Region.IsAdmin     = true;
                Region.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
            }
            return(View(Region));
        }
        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);
        }
        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);
        }
        public async Task <ActionResult> AddorEditServiceCenter(ServiceCenterModel Center)
        {
            var statutory = await CommonModel.GetStatutoryType();

            var applicationTaxTypeList = await CommonModel.GetApplicationTaxType();

            var cltns = TempData["center"] as ServiceCenterModel;

            Center.Organization = new OrganizationModel();
            Center.Organization.GstCategoryList       = new SelectList(dropdown.BindGst(null), "Value", "Text");
            Center.Organization.StatutoryList         = new SelectList(statutory, "Value", "Text");
            Center.Organization.AplicationTaxTypeList = new SelectList(applicationTaxTypeList, "Value", "Text");
            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(dropdown.BindState(), "Value", "Text");
            Center.Contact.CityList        = new SelectList(await CommonModel.GetLookup("City"), "Value", "Text");
            Center.Contact.LocationList    = new SelectList(dropdown.BindLocation(), "Value", "Text");
            Center.ProviderList            = new SelectList(await CommonModel.GetServiceProviders(CurrentUser.CompanyId), "Name", "Text");
            Center.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 (CurrentUser.UserTypeName.ToLower().Contains("super admin"))
            {
                Center.CompanyList = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
            }
            else if (CurrentUser.UserTypeName.ToLower().Contains("company"))
            {
                Center.IsCompany    = true;
                Center.ProviderList = new SelectList(await CommonModel.GetServiceProviders(CurrentUser.CompanyId), "Name", "Text");
                Center.CompanyId    = CurrentUser.CompanyId;
            }



            if (TempData["center"] != null)
            {
                Center = cltns;
            }


            // if (!SessionModel.UserTypeName.ToLower().Contains("super admin"))
            //Center.CompanyId = SessionModel.CompanyId;
            Center.Activetab = "tab-1";
            Center.CreatedBy = CurrentUser.UserId;
            var response = await _Center.AddUpdateDeleteCenter(Center);

            _Center.Save();
            Center.CenterId       = new Guid(response.result);
            Center.Service.RefKey = Center.CenterId;

            TempData["response"] = response;


            if (Center.action == 'I')
            {
                Center.Activetab   = "tab-2";
                TempData["center"] = Center;
                TempData.Keep("center");
                return(View("Create", Center));
            }
            else
            {
                var center = await GetCenter(Center.CenterId);

                center.Activetab = "tab-2";
                return(View("Edit", center));
            }
        }
        public async Task <ActionResult> AddorEditClient(ClientModel client)
        {
            var statutory = await CommonModel.GetStatutoryType();

            var applicationTaxTypeList = await CommonModel.GetApplicationTaxType();

            var cltns = TempData["client"] as ClientModel;

            client.Organization = new OrganizationModel();

            if (TempData["client"] != null)
            {
                client = cltns;
            }
            else
            {
                client.ProcessList = new SelectList(await CommonModel.GetProcesses(CurrentUser.CompanyId), "Value", "Text");
                client.Organization.GstCategoryList       = new SelectList(dropdown.BindGst(null), "Value", "Text");
                client.Organization.StatutoryList         = new SelectList(statutory, "Value", "Text");
                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.CityList = new SelectList(await CommonModel.GetLookup("City"), "Value", "Text");
                client.Contact.LocationList = client.Contact.LocationList = new SelectList(dropdown.BindLocationByPinCode(client.Contact.PinNumber), "Value", "Text");
                if (CurrentUser.UserTypeName.ToLower().Contains("super admin"))
                {
                    client.CompanyList  = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
                    client.IsSuperAdmin = true;
                }
                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"),
                    ServiceId      = null,
                    SubCategoryId  = 0,
                    CategoryId     = 0,
                    ServiceTypeId  = 0,
                    DeliveryTypeId = 0,
                    Remarks        = null,
                    IsActive       = false
                };

                client.Activetab = "tab-1";
                client.CreatedBy = CurrentUser.UserId;
                if (!CurrentUser.UserTypeName.ToLower().Contains("super admin"))
                {
                    client.CompanyId = CurrentUser.CompanyId;
                }
            }
            var response = await _client.AddUpdateDeleteClient(client);

            _client.Save();
            client.ClientId       = new Guid(response.result);
            client.Service.RefKey = client.ClientId;
            TempData["response"]  = response;
            client.Activetab      = "tab-2";
            if (client.action == 'I')
            {
                TempData["client"] = client;
                return(View("Create", client));
            }
            else
            {
                var clt = await GetClient(client.ClientId);

                clt.Activetab = "tab-2";
                return(View("Edit", clt));
            }
        }
        private async Task <ServiceProviderModel> GetProvider(Guid?ProviderId)
        {
            var Provider = await _provider.GetProviderById(ProviderId);

            Provider.Path = _path;



            if (Provider.Organization == null)
            {
                Provider.Organization = new OrganizationModel();
            }


            Provider.Organization.GstCategoryList = new SelectList(dropdown.BindGst(null), "Value", "Text");
            var statutory = await CommonModel.GetStatutoryType();

            Provider.Organization.StatutoryList = new SelectList(statutory, "Value", "Text");
            var applicationTaxTypeList = await CommonModel.GetApplicationTaxType();

            Provider.Organization.AplicationTaxTypeList = new SelectList(applicationTaxTypeList, "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 <SelectListItem>()),
                RefKey       = ProviderId
            };


            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(Enumerable.Empty <SelectList>());
            Provider.Contact.CityList        = new SelectList(Enumerable.Empty <SelectList>());
            Provider.Contact.LocationList    = new SelectList(Enumerable.Empty <SelectList>());
            if (CurrentUser.UserTypeName.ToLower().Contains("super admin"))
            {
                Provider.CompanyList  = new SelectList(await CommonModel.GetCompanies(), "Name", "Text");
                Provider.IsSuperAdmin = true;
            }
            else
            {
                Provider.CompanyId = CurrentUser.CompanyId;
            }
            if (ProviderId != null)
            {
                Provider.action = 'U';
            }
            else
            {
                Provider.action = 'I';
            }
            return(Provider);
        }