public void MapDatabaseValueToObject(User_Master databaseObject) { this.UserId = databaseObject.User_Id; this.UserName = databaseObject.User_Name; this.Password = databaseObject.User_Pwd; this.ActiveUser = (databaseObject.Active_User == "Y"? true:false); this.CreatedBy = databaseObject.Created_By; this.CreatedDate = databaseObject.Create_Dte; this.ModifiedBy = databaseObject.Modify_By; this.ModifiedDate = databaseObject.Modify_Dte; Role = (URORoles)databaseObject.Role; }
public static int GetRoleInteger(URORoles role) { int roleInteger = 0; switch (role) { case URORoles.Admin: roleInteger = 1; break; case URORoles.Owner: roleInteger = 2; break; case URORoles.Data: roleInteger = 3; break; } return roleInteger; }
public static string GetRoleString(URORoles role) { string roleString = "None"; switch (role) { case URORoles.Admin: roleString = "Admin"; break; case URORoles.Owner: roleString = "Project Owner"; break; case URORoles.Data: roleString = "Data Entry"; break; } return roleString; }
public static int GetRoleInteger(URORoles role) { int roleInteger = 0; switch (role) { case URORoles.Admin: roleInteger = 1; break; case URORoles.Owner: roleInteger = 2; break; case URORoles.Data: roleInteger = 3; break; } return(roleInteger); }
public static string GetRoleString(URORoles role) { string roleString = "None"; switch (role) { case URORoles.Admin: roleString = "Admin"; break; case URORoles.Owner: roleString = "Project Owner"; break; case URORoles.Data: roleString = "Data Entry"; break; } return(roleString); }
public static URORoles GetRole(int roleId) { URORoles role = URORoles.None; switch (roleId) { case 1: role = URORoles.Admin; break; case 2: role = URORoles.Owner; break; case 3: role = URORoles.Data; break; } return(role); }