Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaesloadttresults(ref DataRow row, Vaesloadttresults entity)
 {
     row.SetField("vano", entity.vano);
     row.SetField("vasuf", entity.vasuf);
     row.SetField("cVANotes", entity.cVANotes);
     row.SetField("seqno", entity.seqno);
     row.SetField("cSeqNotes", entity.cSeqNotes);
     row.SetField("sctncode", entity.sctncode);
     row.SetField("sctntype", entity.sctntype);
     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("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("allowAddon", entity.allowAddon);
     row.SetField("allowdelete", entity.allowdelete);
     row.SetField("allowcancel", entity.allowcancel);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("sctnBOrelTy", entity.sctnBOrelTy);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Vaesloadttresults BuildVaesloadttresultsFromRow(DataRow row)
        {
            Vaesloadttresults entity = new Vaesloadttresults();

            entity.vano        = row.IsNull("vano") ? 0 : row.Field <int>("vano");
            entity.vasuf       = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf");
            entity.cVANotes    = row.IsNull("cVANotes") ? string.Empty : row.Field <string>("cVANotes");
            entity.seqno       = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            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.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.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.allowAddon  = row.Field <bool>("allowAddon");
            entity.allowdelete = row.Field <bool>("allowdelete");
            entity.allowcancel = row.Field <bool>("allowcancel");
            entity.msdsfl      = row.Field <bool>("msdsfl");
            entity.sctnBOrelTy = row.IsNull("sctnBOrelTy") ? string.Empty : row.Field <string>("sctnBOrelTy");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }