예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSavewlpasswd(ref DataRow row, Savewlpasswd entity)
 {
     row.SetField("pwmaxdays", entity.pwmaxdays);
     row.SetField("pwmindays", entity.pwmindays);
     row.SetField("pwmaxlength", entity.pwmaxlength);
     row.SetField("pwminlength", entity.pwminlength);
     row.SetField("pwminalpha", entity.pwminalpha);
     row.SetField("pwminnumeric", entity.pwminnumeric);
     row.SetField("pwminspecial", entity.pwminspecial);
     row.SetField("pwminprev", entity.pwminprev);
     row.SetField("emp_num", entity.empNum);
     row.SetField("savewlpasswduserfield", entity.savewlpasswduserfield);
 }
예제 #2
0
        public static Savewlpasswd BuildSavewlpasswdFromRow(DataRow row)
        {
            Savewlpasswd entity = new Savewlpasswd();

            entity.pwmaxdays             = row.IsNull("pwmaxdays") ? 0 : row.Field <int>("pwmaxdays");
            entity.pwmindays             = row.IsNull("pwmindays") ? 0 : row.Field <int>("pwmindays");
            entity.pwmaxlength           = row.IsNull("pwmaxlength") ? 0 : row.Field <int>("pwmaxlength");
            entity.pwminlength           = row.IsNull("pwminlength") ? 0 : row.Field <int>("pwminlength");
            entity.pwminalpha            = row.IsNull("pwminalpha") ? 0 : row.Field <int>("pwminalpha");
            entity.pwminnumeric          = row.IsNull("pwminnumeric") ? 0 : row.Field <int>("pwminnumeric");
            entity.pwminspecial          = row.IsNull("pwminspecial") ? 0 : row.Field <int>("pwminspecial");
            entity.pwminprev             = row.IsNull("pwminprev") ? 0 : row.Field <int>("pwminprev");
            entity.empNum                = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_num");
            entity.savewlpasswduserfield = row.IsNull("savewlpasswduserfield") ? string.Empty : row.Field <string>("savewlpasswduserfield");
            return(entity);
        }