public ActionResult SaveCustomers(CustomerProfileAndRegistration CustomerProfileAndRegistration) { try { int status = 0; SuperAdminDAL DAL = new SuperAdminDAL(); SuperAdminViewModel viewModel = new SuperAdminViewModel(); status = DAL.SaveCustomers(CustomerProfileAndRegistration); viewModel.GetUserProfileAndUserRegistrationRecord = DAL.GetUserProfileAndVendorRegistrationRecord(null, Convert.ToString(Session["UserType"])); return(PartialView("_ManageCustomer", viewModel)); } catch (Exception ex) { throw; } }
public ActionResult Customer() { try { int status = 0; SuperAdminDAL DAL = new SuperAdminDAL(); MVCUtility utility = new MVCUtility(); SuperAdminViewModel viewModel = new SuperAdminViewModel(); viewModel.DepartmentList = utility.GetLookupsByLookupType(true, "Department"); viewModel.UserType = utility.GetLookupsByLookupTypeTranslatedAsValueForUserType(true, "UserType", Convert.ToString(Session["UserType"])); viewModel.GetUserProfileAndUserRegistrationRecord = DAL.GetUserProfileAndVendorRegistrationRecord(null, Convert.ToString(Session["UserType"])); return(View(viewModel)); } catch (Exception ex) { throw; } }
public ActionResult DeleteUser(int UserProfileId, int UserRegistrationId) { try { SuperAdminViewModel viewmodel = new SuperAdminViewModel(); SuperAdminDAL DAL = new SuperAdminDAL(); CustomerProfileAndRegistration CustomerProfileAndRegistration = new CustomerProfileAndRegistration(); CustomerProfileAndRegistration.UserRegistration = new UserRegistration(); CustomerProfileAndRegistration.UserProfile = new UserProfile(); CustomerProfileAndRegistration.UserRegistration.Id = Convert.ToInt32(UserRegistrationId); CustomerProfileAndRegistration.UserProfile.Id = Convert.ToInt32(UserProfileId); int status = DAL.DeleteUser(CustomerProfileAndRegistration); viewmodel.GetUserProfileAndUserRegistrationRecord = DAL.GetUserProfileAndVendorRegistrationRecord(null, Convert.ToString(Session["UserType"])); return(PartialView("_ManageCustomer", viewmodel)); } catch (Exception ex) { throw; } }