Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromEmpmstcopy(ref DataRow row, Empmstcopy entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("emp_num", entity.empNum);
     row.SetField("emp_name", entity.empName);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("empmstcopyuserfield", entity.empmstcopyuserfield);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Empmstcopy BuildEmpmstcopyFromRow(DataRow row)
        {
            Empmstcopy entity = new Empmstcopy();

            entity.coNum               = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num");
            entity.whNum               = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num");
            entity.empNum              = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_num");
            entity.empName             = row.IsNull("emp_name") ? string.Empty : row.Field <string>("emp_name");
            entity.rowid               = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.empmstcopyuserfield = row.IsNull("empmstcopyuserfield") ? string.Empty : row.Field <string>("empmstcopyuserfield");
            entity.userfield           = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }