Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromItemaltwhse(ref DataRow row, Itemaltwhse entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("availQty", entity.availQty);
     row.SetField("resvQty", entity.resvQty);
     row.SetField("unavQty", entity.unavQty);
     row.SetField("totQty", entity.totQty);
     row.SetField("itemaltwhseuserfield", entity.itemaltwhseuserfield);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Itemaltwhse BuildItemaltwhseFromRow(DataRow row)
        {
            Itemaltwhse entity = new Itemaltwhse();

            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.availQty             = row.IsNull("availQty") ? decimal.Zero : row.Field <decimal>("availQty");
            entity.resvQty              = row.IsNull("resvQty") ? decimal.Zero : row.Field <decimal>("resvQty");
            entity.unavQty              = row.IsNull("unavQty") ? decimal.Zero : row.Field <decimal>("unavQty");
            entity.totQty               = row.IsNull("totQty") ? decimal.Zero : row.Field <decimal>("totQty");
            entity.itemaltwhseuserfield = row.IsNull("itemaltwhseuserfield") ? string.Empty : row.Field <string>("itemaltwhseuserfield");
            entity.userfield            = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }