Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        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);
        }