예제 #1
0
        public static Poipbuildpolistcriteria BuildPoipbuildpolistcriteriaFromRow(DataRow row)
        {
            Poipbuildpolistcriteria entity = new Poipbuildpolistcriteria();

            entity.vendno            = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.whse              = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod              = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.compselect        = row.IsNull("compselect") ? string.Empty : row.Field <string>("compselect");
            entity.shipfmno          = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.podisplay         = row.IsNull("podisplay") ? string.Empty : row.Field <string>("podisplay");
            entity.buyer             = row.IsNull("buyer") ? string.Empty : row.Field <string>("buyer");
            entity.rcvinit           = row.IsNull("rcvinit") ? string.Empty : row.Field <string>("rcvinit");
            entity.receiverno        = row.IsNull("receiverno") ? string.Empty : row.Field <string>("receiverno");
            entity.approval          = row.IsNull("approval") ? string.Empty : row.Field <string>("approval");
            entity.takenby           = row.IsNull("takenby") ? string.Empty : row.Field <string>("takenby");
            entity.transtype         = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.botype            = row.IsNull("botype") ? string.Empty : row.Field <string>("botype");
            entity.stage             = row.IsNull("stage") ? string.Empty : row.Field <string>("stage");
            entity.fromcosteddt      = row.Field <DateTime?>("fromcosteddt");
            entity.fromduedt         = row.Field <DateTime?>("fromduedt");
            entity.fromenterdt       = row.Field <DateTime?>("fromenterdt");
            entity.fromorderdt       = row.Field <DateTime?>("fromorderdt");
            entity.frompaiddt        = row.Field <DateTime?>("frompaiddt");
            entity.fromprinteddt     = row.Field <DateTime?>("fromprinteddt");
            entity.fromreceiptdt     = row.Field <DateTime?>("fromreceiptdt");
            entity.fromreqshipdt     = row.Field <DateTime?>("fromreqshipdt");
            entity.tocosteddt        = row.Field <DateTime?>("tocosteddt");
            entity.toduedt           = row.Field <DateTime?>("toduedt");
            entity.toenterdt         = row.Field <DateTime?>("toenterdt");
            entity.toorderdt         = row.Field <DateTime?>("toorderdt");
            entity.topaiddt          = row.Field <DateTime?>("topaiddt");
            entity.toprinteddt       = row.Field <DateTime?>("toprinteddt");
            entity.toreceiptdt       = row.Field <DateTime?>("toreceiptdt");
            entity.toreqshipdt       = row.Field <DateTime?>("toreqshipdt");
            entity.repairordno       = row.IsNull("repairordno") ? 0 : row.Field <int>("repairordno");
            entity.repairordsuf      = row.IsNull("repairordsuf") ? 0 : row.Field <int>("repairordsuf");
            entity.trackno           = row.IsNull("trackno") ? 0 : row.Field <int>("trackno");
            entity.contno            = row.IsNull("contno") ? string.Empty : row.Field <string>("contno");
            entity.irecordcountlimit = row.IsNull("irecordcountlimit") ? 0 : row.Field <int>("irecordcountlimit");
            entity.customparam       = row.IsNull("customparam") ? string.Empty : row.Field <string>("customparam");
            entity.pono              = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf             = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.vendtype          = row.IsNull("vendtype") ? string.Empty : row.Field <string>("vendtype");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
예제 #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPoipbuildpolistcriteria(ref DataRow row, Poipbuildpolistcriteria entity)
 {
     row.SetField("vendno", entity.vendno);
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("compselect", entity.compselect);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("podisplay", entity.podisplay);
     row.SetField("buyer", entity.buyer);
     row.SetField("rcvinit", entity.rcvinit);
     row.SetField("receiverno", entity.receiverno);
     row.SetField("approval", entity.approval);
     row.SetField("takenby", entity.takenby);
     row.SetField("transtype", entity.transtype);
     row.SetField("botype", entity.botype);
     row.SetField("stage", entity.stage);
     row.SetField("fromcosteddt", entity.fromcosteddt);
     row.SetField("fromduedt", entity.fromduedt);
     row.SetField("fromenterdt", entity.fromenterdt);
     row.SetField("fromorderdt", entity.fromorderdt);
     row.SetField("frompaiddt", entity.frompaiddt);
     row.SetField("fromprinteddt", entity.fromprinteddt);
     row.SetField("fromreceiptdt", entity.fromreceiptdt);
     row.SetField("fromreqshipdt", entity.fromreqshipdt);
     row.SetField("tocosteddt", entity.tocosteddt);
     row.SetField("toduedt", entity.toduedt);
     row.SetField("toenterdt", entity.toenterdt);
     row.SetField("toorderdt", entity.toorderdt);
     row.SetField("topaiddt", entity.topaiddt);
     row.SetField("toprinteddt", entity.toprinteddt);
     row.SetField("toreceiptdt", entity.toreceiptdt);
     row.SetField("toreqshipdt", entity.toreqshipdt);
     row.SetField("repairordno", entity.repairordno);
     row.SetField("repairordsuf", entity.repairordsuf);
     row.SetField("trackno", entity.trackno);
     row.SetField("contno", entity.contno);
     row.SetField("irecordcountlimit", entity.irecordcountlimit);
     row.SetField("customparam", entity.customparam);
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("vendtype", entity.vendtype);
     row.SetField("userfield", entity.userfield);
 }