Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcentrylotscreate(ref DataRow row, Icentrylotscreate entity)
 {
     row.SetField("selectedfl", entity.selectedfl);
     row.SetField("lotno", entity.lotno);
     row.SetField("quantity", entity.quantity);
     row.SetField("opendt", entity.opendt);
     row.SetField("expiredt", entity.expiredt);
     row.SetField("cost", entity.cost);
     row.SetField("binloc1", entity.binloc1);
     row.SetField("binloc2", entity.binloc2);
     row.SetField("qtyunavail", entity.qtyunavail);
     row.SetField("reasunavty", entity.reasunavty);
     row.SetField("wtreturnorigasked", entity.wtreturnorigasked);
     row.SetField("wtreturnoriganswer", entity.wtreturnoriganswer);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Icentrylotscreate BuildIcentrylotscreateFromRow(DataRow row)
        {
            Icentrylotscreate entity = new Icentrylotscreate();

            entity.selectedfl         = row.Field <bool>("selectedfl");
            entity.lotno              = row.IsNull("lotno") ? string.Empty : row.Field <string>("lotno");
            entity.quantity           = row.IsNull("quantity") ? decimal.Zero : row.Field <decimal>("quantity");
            entity.opendt             = row.Field <DateTime?>("opendt");
            entity.expiredt           = row.Field <DateTime?>("expiredt");
            entity.cost               = row.IsNull("cost") ? decimal.Zero : row.Field <decimal>("cost");
            entity.binloc1            = row.IsNull("binloc1") ? string.Empty : row.Field <string>("binloc1");
            entity.binloc2            = row.IsNull("binloc2") ? string.Empty : row.Field <string>("binloc2");
            entity.qtyunavail         = row.IsNull("qtyunavail") ? decimal.Zero : row.Field <decimal>("qtyunavail");
            entity.reasunavty         = row.IsNull("reasunavty") ? string.Empty : row.Field <string>("reasunavty");
            entity.wtreturnorigasked  = row.Field <bool>("wtreturnorigasked");
            entity.wtreturnoriganswer = row.Field <bool>("wtreturnoriganswer");
            entity.userfield          = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }