Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcepeaddproductcriteria(ref DataRow row, Icepeaddproductcriteria entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("runno", entity.runno);
     row.SetField("ticketno", entity.ticketno);
     row.SetField("prod", entity.prod);
     row.SetField("binloc", entity.binloc);
     row.SetField("qtyexp", entity.qtyexp);
     row.SetField("unit", entity.unit);
     row.SetField("unavailfl", entity.unavailfl);
     row.SetField("diffbinconfirm", entity.diffbinconfirm);
     row.SetField("anothercountconfirm", entity.anothercountconfirm);
     row.SetField("createbinconfirm", entity.createbinconfirm);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Icepeaddproductcriteria BuildIcepeaddproductcriteriaFromRow(DataRow row)
        {
            Icepeaddproductcriteria entity = new Icepeaddproductcriteria();

            entity.whse                = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.runno               = row.IsNull("runno") ? 0 : row.Field <int>("runno");
            entity.ticketno            = row.IsNull("ticketno") ? 0 : row.Field <int>("ticketno");
            entity.prod                = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.binloc              = row.IsNull("binloc") ? string.Empty : row.Field <string>("binloc");
            entity.qtyexp              = row.IsNull("qtyexp") ? decimal.Zero : row.Field <decimal>("qtyexp");
            entity.unit                = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.unavailfl           = row.Field <bool>("unavailfl");
            entity.diffbinconfirm      = row.Field <bool>("diffbinconfirm");
            entity.anothercountconfirm = row.Field <bool>("anothercountconfirm");
            entity.createbinconfirm    = row.Field <bool>("createbinconfirm");
            entity.userfield           = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }