コード例 #1
0
        public static Vaeiresults BuildVaeiresultsFromRow(DataRow row)
        {
            Vaeiresults entity = new Vaeiresults();

            entity.vano            = row.IsNull("vano") ? 0 : row.Field <int>("vano");
            entity.vasuf           = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf");
            entity.seqno           = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.finalprodfl     = row.Field <bool>("finalprodfl");
            entity.cVANotes        = row.IsNull("cVANotes") ? string.Empty : row.Field <string>("cVANotes");
            entity.cSeqNotes       = row.IsNull("cSeqNotes") ? string.Empty : row.Field <string>("cSeqNotes");
            entity.sctncode        = row.IsNull("sctncode") ? string.Empty : row.Field <string>("sctncode");
            entity.sctntype        = row.IsNull("sctntype") ? string.Empty : row.Field <string>("sctntype");
            entity.sctnstage       = row.IsNull("sctnstage") ? 0 : row.Field <int>("sctnstage");
            entity.sctnstagex      = row.IsNull("sctnstagex") ? string.Empty : row.Field <string>("sctnstagex");
            entity.sctndescrip     = row.IsNull("sctndescrip") ? string.Empty : row.Field <string>("sctndescrip");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.stagecd         = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagecdx        = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx");
            entity.transtype       = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.nonstockty      = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty");
            entity.shipprod        = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.cProdNotes      = row.IsNull("cProdNotes") ? string.Empty : row.Field <string>("cProdNotes");
            entity.proddesc        = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.proddesc2       = row.IsNull("proddesc2") ? string.Empty : row.Field <string>("proddesc2");
            entity.qtyord          = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.qtyship         = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.unit            = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.verno           = row.IsNull("verno") ? 0 : row.Field <int>("verno");
            entity.enterdt         = row.Field <DateTime?>("enterdt");
            entity.reqshipdt       = row.Field <DateTime?>("reqshipdt");
            entity.promisedt       = row.Field <DateTime?>("promisedt");
            entity.estcompdt       = row.Field <DateTime?>("estcompdt");
            entity.laborchkfl      = row.Field <bool>("laborchkfl");
            entity.prevshipexistfl = row.Field <bool>("prevshipexistfl");
            entity.wlwhsefl        = row.Field <bool>("wlwhsefl");
            entity.addonsenabledfl = row.Field <bool>("addonsenabledfl");
            entity.msdsfl          = row.Field <bool>("msdsfl");
            entity.lockinfo        = row.IsNull("lockinfo") ? string.Empty : row.Field <string>("lockinfo");
            entity.statusmessage   = row.IsNull("statusmessage") ? string.Empty : row.Field <string>("statusmessage");
            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 UpdateRowFromVaeiresults(ref DataRow row, Vaeiresults entity)
 {
     row.SetField("vano", entity.vano);
     row.SetField("vasuf", entity.vasuf);
     row.SetField("seqno", entity.seqno);
     row.SetField("finalprodfl", entity.finalprodfl);
     row.SetField("cVANotes", entity.cVANotes);
     row.SetField("cSeqNotes", entity.cSeqNotes);
     row.SetField("sctncode", entity.sctncode);
     row.SetField("sctntype", entity.sctntype);
     row.SetField("sctnstage", entity.sctnstage);
     row.SetField("sctnstagex", entity.sctnstagex);
     row.SetField("sctndescrip", entity.sctndescrip);
     row.SetField("whse", entity.whse);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecdx", entity.stagecdx);
     row.SetField("transtype", entity.transtype);
     row.SetField("nonstockty", entity.nonstockty);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("cProdNotes", entity.cProdNotes);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("proddesc2", entity.proddesc2);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("unit", entity.unit);
     row.SetField("verno", entity.verno);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("promisedt", entity.promisedt);
     row.SetField("estcompdt", entity.estcompdt);
     row.SetField("laborchkfl", entity.laborchkfl);
     row.SetField("prevshipexistfl", entity.prevshipexistfl);
     row.SetField("wlwhsefl", entity.wlwhsefl);
     row.SetField("addonsenabledfl", entity.addonsenabledfl);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("lockinfo", entity.lockinfo);
     row.SetField("statusmessage", entity.statusmessage);
     row.SetField("userfield", entity.userfield);
 }