Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCreateictransttresults(ref DataRow row, Createictransttresults entity)
 {
     row.SetField("cICETRowId", entity.cICETRowId);
     row.SetField("cModule", entity.cModule);
     row.SetField("cName", entity.cName);
     row.SetField("cProd", entity.cProd);
     row.SetField("cSign", entity.cSign);
     row.SetField("cTransDesc", entity.cTransDesc);
     row.SetField("cTransType", entity.cTransType);
     row.SetField("Custno", entity.custno);
     row.SetField("cWhse", entity.cWhse);
     row.SetField("dQtyOnHand", entity.dQtyOnHand);
     row.SetField("dStkQtyShip", entity.dStkQtyShip);
     row.SetField("dtPosted", entity.dtPosted);
     row.SetField("iJrnlNo", entity.iJrnlNo);
     row.SetField("iOrderNo", entity.iOrderNo);
     row.SetField("iOrderSuf", entity.iOrderSuf);
     row.SetField("iSetNo", entity.iSetNo);
     row.SetField("cOrderNotes", entity.cOrderNotes);
     row.SetField("cCustVendNotes", entity.cCustVendNotes);
     row.SetField("cProdNotes", entity.cProdNotes);
     row.SetField("cTransNotes", entity.cTransNotes);
     row.SetField("cICETNotes", entity.cICETNotes);
     row.SetField("iICETNotesID", entity.iICETNotesID);
     row.SetField("cTransDtTmSort", entity.cTransDtTmSort);
     row.SetField("dVendNo", entity.dVendNo);
     row.SetField("rRowid", entity.rRowid.ToByteArray());
     row.SetField("dtReqShipDt", entity.dtReqShipDt);
     row.SetField("ilineno", entity.ilineno);
     row.SetField("archive", entity.archive);
     row.SetField("countryoforigin", entity.countryoforigin);
     row.SetField("tariffcd", entity.tariffcd);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Createictransttresults BuildCreateictransttresultsFromRow(DataRow row)
        {
            Createictransttresults entity = new Createictransttresults();

            entity.cICETRowId      = row.IsNull("cICETRowId") ? string.Empty : row.Field <string>("cICETRowId");
            entity.cModule         = row.IsNull("cModule") ? string.Empty : row.Field <string>("cModule");
            entity.cName           = row.IsNull("cName") ? string.Empty : row.Field <string>("cName");
            entity.cProd           = row.IsNull("cProd") ? string.Empty : row.Field <string>("cProd");
            entity.cSign           = row.IsNull("cSign") ? string.Empty : row.Field <string>("cSign");
            entity.cTransDesc      = row.IsNull("cTransDesc") ? string.Empty : row.Field <string>("cTransDesc");
            entity.cTransType      = row.IsNull("cTransType") ? string.Empty : row.Field <string>("cTransType");
            entity.custno          = row.IsNull("Custno") ? string.Empty : row.Field <string>("Custno");
            entity.cWhse           = row.IsNull("cWhse") ? string.Empty : row.Field <string>("cWhse");
            entity.dQtyOnHand      = row.IsNull("dQtyOnHand") ? decimal.Zero : row.Field <decimal>("dQtyOnHand");
            entity.dStkQtyShip     = row.IsNull("dStkQtyShip") ? decimal.Zero : row.Field <decimal>("dStkQtyShip");
            entity.dtPosted        = row.Field <DateTime?>("dtPosted");
            entity.iJrnlNo         = row.IsNull("iJrnlNo") ? 0 : row.Field <int>("iJrnlNo");
            entity.iOrderNo        = row.IsNull("iOrderNo") ? 0 : row.Field <int>("iOrderNo");
            entity.iOrderSuf       = row.IsNull("iOrderSuf") ? 0 : row.Field <int>("iOrderSuf");
            entity.iSetNo          = row.IsNull("iSetNo") ? 0 : row.Field <int>("iSetNo");
            entity.cOrderNotes     = row.IsNull("cOrderNotes") ? string.Empty : row.Field <string>("cOrderNotes");
            entity.cCustVendNotes  = row.IsNull("cCustVendNotes") ? string.Empty : row.Field <string>("cCustVendNotes");
            entity.cProdNotes      = row.IsNull("cProdNotes") ? string.Empty : row.Field <string>("cProdNotes");
            entity.cTransNotes     = row.IsNull("cTransNotes") ? string.Empty : row.Field <string>("cTransNotes");
            entity.cICETNotes      = row.IsNull("cICETNotes") ? string.Empty : row.Field <string>("cICETNotes");
            entity.iICETNotesID    = row.IsNull("iICETNotesID") ? 0 : row.Field <int>("iICETNotesID");
            entity.cTransDtTmSort  = row.IsNull("cTransDtTmSort") ? string.Empty : row.Field <string>("cTransDtTmSort");
            entity.dVendNo         = row.IsNull("dVendNo") ? decimal.Zero : row.Field <decimal>("dVendNo");
            entity.rRowid          = row.Field <byte[]>("rRowid").ToStringEncoded();
            entity.dtReqShipDt     = row.Field <DateTime?>("dtReqShipDt");
            entity.ilineno         = row.IsNull("ilineno") ? 0 : row.Field <int>("ilineno");
            entity.archive         = row.IsNull("archive") ? string.Empty : row.Field <string>("archive");
            entity.countryoforigin = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin");
            entity.tariffcd        = row.IsNull("tariffcd") ? string.Empty : row.Field <string>("tariffcd");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }