public IActionResult GetUserManagementPermisssionsById(IdData dataOne) { try { if (dataOne.Permission.Id != null) { // var roles = _roleService.GetAllPermissions(); //roles = roles.Where(x => x.Id == int.Parse(id.ToString())).ToList(); //var parent = roles.Where(x => x.ParentPermissionId == null).Select(c => new RoleNode { value = c.Id.Value, label = c.PermissionName, children = addChild(c.Id, roles) }).ToList(); //var checkedNode = parent.Select(c => c.value).ToList(); UserManagementData userData = new UserManagementData(); List <string> checkedNode = new List <string>(); checkedNode.Add("1"); checkedNode.Add("3"); userData.Permissions = checkedNode; userData.userManagement = new UserManagementProperties(); userData.userManagement.FirstName = "Osama"; userData.userManagement.LastName = "This is testing"; userData.userManagement.Password = "******"; return(Ok(userData)); } else { return(NotFound("Record Not Found")); } } catch (System.Exception ex) { return(NotFound("Something Went wrong" + ex.Message.ToString())); } }
/// <summary> /// Gets the comments based on the keyid, formid and userid. /// </summary> /// <param name="userId">The user id.</param> /// <param name="nameDisplay">The name display.</param> /// <param name="nameFull">The name full.</param> /// <param name="nameNet">The name net.</param> /// <param name="email">The email.</param> /// <param name="active">if set to <c>true</c> [active].</param> /// <param name="administrator">if set to <c>true</c> [administrator].</param> /// <param name="applicationId">applicationId</param> /// <param name="loginuserId">loginuserID</param> /// <returns>Return Dataset 0 valid insert or 1</returns> public static UserManagementData SaveUserDetails(int userId, string nameDisplay, string nameFull, string nameNet, string email, int active, int administrator, int appraiser, int applicationId, int loginuserId) { UserManagementData userManagementData = new UserManagementData(); Hashtable ht = new Hashtable(); if (userId == 0) { ht.Add("@UserID", DBNull.Value); } else { ht.Add("@UserID", userId); } ht.Add("@Name_Display", nameDisplay); ht.Add("@Name_Full", nameFull); ht.Add("@Name_Net", nameNet); ht.Add("@Email", email); ht.Add("@Active", active); ht.Add("@IsAdministrator", administrator); ht.Add("@IsAppraiser", appraiser); ////ht.Add("@ApplicationID", 1); //// the 1 is temp hardcoded its should be removed ht.Add("@ApplicationID", applicationId); ht.Add("@LoginUserID", loginuserId); Utility.LoadDataSet(userManagementData.GetErrorMessage, "f9002_pcins_User", ht); return(userManagementData); }
/// <summary> /// Gets the user details. /// </summary> /// <param name="applicationId">The application ID.</param> /// <returns>userManagementData</returns> public static UserManagementData F9002_GetUserDetails(int applicationId) { UserManagementData userManagementData = new UserManagementData(); Hashtable ht = new Hashtable(); ht.Add("@ApplicationID", applicationId); Utility.LoadDataSet(userManagementData.ListUserDetail, "f9002_pclst_User", ht); return(userManagementData); }
/// <summary> /// Gets the comments based on the keyid, formid and userid. /// </summary> /// <param name="applicationId">applicationId</param> /// <returns>The dataset containing the comments.</returns> public static UserManagementData GetUserGroupDetails(int applicationId) { UserManagementData userManagementData = new UserManagementData(); Hashtable ht = new Hashtable(); ht.Add("@ApplicationID", applicationId); string[] optionalParameter = new string[] { userManagementData.ListUserDetail.TableName, userManagementData.ListUserGroupDetail.TableName }; Utility.LoadDataSet(userManagementData, "f9002_pclst_UserInGroup", ht, optionalParameter); return(userManagementData); }
/// <summary> /// Gets the comments based on the keyid, formid and userid. /// </summary> /// <param name="userId">userId</param> /// <returns>The dataset containing the comments.</returns> public static UserManagementData GetGroupDetails(int userId) { UserManagementData userManagementData = new UserManagementData(); Hashtable ht = new Hashtable(); ht.Add("@UserID", userId); string[] optionalParameter = new string[] { userManagementData.ListGroupsGroupDetail.TableName, userManagementData.ListGroupDetail.TableName }; Utility.LoadDataSet(userManagementData, "f9002_pclst_GroupInUser", ht, optionalParameter); return(userManagementData); }
/// <summary> /// Gets the comments based on the keyid, formid and userid. /// </summary> /// <param name="userId">userId</param> /// <returns>The dataset containing the comments.</returns> public static UserManagementData GetGroupPermissionDetails(int userId) { UserManagementData userManagementData = new UserManagementData(); userManagementData.EnforceConstraints = false; Hashtable ht = new Hashtable(); ht.Add("@UserID", userId); string[] optionalParameter = new string[] { userManagementData.ListPermissionGroupDetail.TableName, userManagementData.ListPermissionDetail.TableName }; Utility.LoadDataSet(userManagementData, "f9002_pclst_GroupPermission", ht, optionalParameter); return(userManagementData); }
/// <summary> /// Gets the Check detail and fill Subfund item grid /// </summary> private void GetCheckDetail() { ////set pageLoadStatus - suppress textchanged event this.pageLoadStatus = true; this.checkDetail.Clear(); this.checkDetail = this.F1222Control.WorkItem.F1226_GetCashLedger(this.currentclid); if (this.checkDetail.GetCheckDetail.Rows.Count > 0) { this.CLIDTextBox.Text = this.checkDetail.GetCheckDetail.Rows[0][this.checkDetail.GetCheckDetail.KeyIDColumn].ToString(); this.PayableToTextBox.Text = this.checkDetail.GetCheckDetail.Rows[0][this.checkDetail.GetCheckDetail.PayableToColumn].ToString(); this.CheckAmountTextBox.Text = this.checkDetail.GetCheckDetail.Rows[0][this.checkDetail.GetCheckDetail.AmountColumn].ToString(); this.CheckDateTextBox.Text = this.checkDetail.GetCheckDetail.Rows[0][this.checkDetail.GetCheckDetail.EntryDateColumn].ToString(); ////load mailedby combo UserManagementData userManagementData = new UserManagementData(); userManagementData = this.form1222Control.WorkItem.F9002_GetUserDetails(TerraScanCommon.ApplicationId); this.MailedByComboBox.DataSource = userManagementData.ListUserDetail; this.MailedByComboBox.DisplayMember = userManagementData.ListUserDetail.DisplayNameColumn.ColumnName; this.MailedByComboBox.ValueMember = userManagementData.ListUserDetail.UserIDColumn.ColumnName; if (!string.IsNullOrEmpty(this.checkDetail.GetCheckDetail.Rows[0][this.checkDetail.GetCheckDetail.MailedByColumn].ToString()) && !string.IsNullOrEmpty(this.checkDetail.GetCheckDetail.Rows[0][this.checkDetail.GetCheckDetail.MailedDateColumn].ToString())) { this.MailedCheckBox.Checked = true; this.MailedByComboBox.SelectedValue = Convert.ToInt32(this.checkDetail.GetCheckDetail.Rows[0][this.checkDetail.GetCheckDetail.MailedByIDColumn].ToString()); this.MailedOnTextBox.Text = this.checkDetail.GetCheckDetail.Rows[0][this.checkDetail.GetCheckDetail.MailedDateColumn].ToString(); } else { this.MailedCheckBox.Checked = false; this.MailedByComboBox.SelectedIndex = -1; this.MailedOnTextBox.Text = DateTime.Now.ToString("MM/dd/yyyy"); this.MailedByComboBox.Enabled = false; this.MailedOnTextBox.Enabled = false; this.MailedOnButton.Enabled = false; } } else { this.ClearCheckDetail(); } ////reset pageLoadStatus - trigger textchanged event this.pageLoadStatus = false; }
/// <summary> /// Inserts the group details. /// </summary> /// <param name="groupId">The group id.</param> /// <param name="groupName">Name of the group.</param> /// <param name="description">The description.</param> /// <param name="userGroup">The user group.</param> /// <param name="userId">userId</param> /// <returns>DataSet 1 for success insert 0 for error</returns> public static UserManagementData InsertGroupDetails(int groupId, string groupName, string description, string userGroup, int userId) { UserManagementData userManagementData = new UserManagementData(); Hashtable ht = new Hashtable(); if (groupId == 0) { ht.Add("@GroupID", DBNull.Value); } else { ht.Add("@GroupID", groupId); } ht.Add("@GroupName", groupName); ht.Add("@Description", description); ht.Add("@UserID", userId); ht.Add("@Users", userGroup); Utility.LoadDataSet(userManagementData.GetErrorMessage, "f9002_pcins_UserGroup", ht); return(userManagementData); }
public IActionResult UpdateUserPermission(UserManagementData roleData) { return(Content("Record Save has been updated SuccessFully")); }
public IActionResult SaveUserPermission(UserManagementData userData) { return(Content("Record Save has benn save SuccessFully")); }