Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaifbuildvalistcriteria(ref DataRow row, Vaifbuildvalistcriteria entity)
 {
     row.SetField("vano", entity.vano);
     row.SetField("vasuf", entity.vasuf);
     row.SetField("prod", entity.prod);
     row.SetField("verno", entity.verno);
     row.SetField("compprod", entity.compprod);
     row.SetField("whse", entity.whse);
     row.SetField("custno", entity.custno);
     row.SetField("vendno", entity.vendno);
     row.SetField("takenby", entity.takenby);
     row.SetField("slstage", entity.slstage);
     row.SetField("sltranstype", entity.sltranstype);
     row.SetField("slprodstat", entity.slprodstat);
     row.SetField("detailtype", entity.detailtype);
     row.SetField("fromentereddate", entity.fromentereddate);
     row.SetField("toentereddate", entity.toentereddate);
     row.SetField("frompromiseddate", entity.frompromiseddate);
     row.SetField("topromiseddate", entity.topromiseddate);
     row.SetField("fromreqshipdate", entity.fromreqshipdate);
     row.SetField("toreqshipdate", entity.toreqshipdate);
     row.SetField("fromestcompdt", entity.fromestcompdt);
     row.SetField("toestcompdt", entity.toestcompdt);
     row.SetField("slbotype", entity.slbotype);
     row.SetField("fromreceiptdt", entity.fromreceiptdt);
     row.SetField("toreceiptdt", entity.toreceiptdt);
     row.SetField("irecordcountlimit", entity.irecordcountlimit);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Vaifbuildvalistcriteria BuildVaifbuildvalistcriteriaFromRow(DataRow row)
        {
            Vaifbuildvalistcriteria entity = new Vaifbuildvalistcriteria();

            entity.vano              = row.IsNull("vano") ? 0 : row.Field <int>("vano");
            entity.vasuf             = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf");
            entity.prod              = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.verno             = row.IsNull("verno") ? 0 : row.Field <int>("verno");
            entity.compprod          = row.IsNull("compprod") ? string.Empty : row.Field <string>("compprod");
            entity.whse              = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.custno            = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.vendno            = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.takenby           = row.IsNull("takenby") ? string.Empty : row.Field <string>("takenby");
            entity.slstage           = row.IsNull("slstage") ? string.Empty : row.Field <string>("slstage");
            entity.sltranstype       = row.IsNull("sltranstype") ? string.Empty : row.Field <string>("sltranstype");
            entity.slprodstat        = row.IsNull("slprodstat") ? string.Empty : row.Field <string>("slprodstat");
            entity.detailtype        = row.IsNull("detailtype") ? 0 : row.Field <int>("detailtype");
            entity.fromentereddate   = row.Field <DateTime?>("fromentereddate");
            entity.toentereddate     = row.Field <DateTime?>("toentereddate");
            entity.frompromiseddate  = row.Field <DateTime?>("frompromiseddate");
            entity.topromiseddate    = row.Field <DateTime?>("topromiseddate");
            entity.fromreqshipdate   = row.Field <DateTime?>("fromreqshipdate");
            entity.toreqshipdate     = row.Field <DateTime?>("toreqshipdate");
            entity.fromestcompdt     = row.Field <DateTime?>("fromestcompdt");
            entity.toestcompdt       = row.Field <DateTime?>("toestcompdt");
            entity.slbotype          = row.IsNull("slbotype") ? string.Empty : row.Field <string>("slbotype");
            entity.fromreceiptdt     = row.Field <DateTime?>("fromreceiptdt");
            entity.toreceiptdt       = row.Field <DateTime?>("toreceiptdt");
            entity.irecordcountlimit = row.IsNull("irecordcountlimit") ? 0 : row.Field <int>("irecordcountlimit");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }