示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCcemployees(ref DataRow row, Ccemployees entity)
 {
     row.SetField("emp_num", entity.empNum);
     row.SetField("name", entity.name);
     row.SetField("selected", entity.selected);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Ccemployees BuildCcemployeesFromRow(DataRow row)
        {
            Ccemployees entity = new Ccemployees();

            entity.empNum    = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_num");
            entity.name      = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.selected  = row.Field <bool>("selected");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }