Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCreateicfuturettresults(ref DataRow row, Createicfuturettresults entity)
 {
     row.SetField("cModule", entity.cModule);
     row.SetField("cName", entity.cName);
     row.SetField("cTransType", entity.cTransType);
     row.SetField("dQtyBal", entity.dQtyBal);
     row.SetField("dQtyOrd", entity.dQtyOrd);
     row.SetField("dtDue", entity.dtDue);
     row.SetField("iOrderNo", entity.iOrderNo);
     row.SetField("iOrderSuf", entity.iOrderSuf);
     row.SetField("iSortOrder", entity.iSortOrder);
     row.SetField("lAssign", entity.lAssign);
     row.SetField("cOrderNotes", entity.cOrderNotes);
     row.SetField("cCustVendNotes", entity.cCustVendNotes);
     row.SetField("dVendNo", entity.dVendNo);
     row.SetField("dCustNo", entity.dCustNo);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Createicfuturettresults BuildCreateicfuturettresultsFromRow(DataRow row)
        {
            Createicfuturettresults entity = new Createicfuturettresults();

            entity.cModule        = row.IsNull("cModule") ? string.Empty : row.Field <string>("cModule");
            entity.cName          = row.IsNull("cName") ? string.Empty : row.Field <string>("cName");
            entity.cTransType     = row.IsNull("cTransType") ? string.Empty : row.Field <string>("cTransType");
            entity.dQtyBal        = row.IsNull("dQtyBal") ? decimal.Zero : row.Field <decimal>("dQtyBal");
            entity.dQtyOrd        = row.IsNull("dQtyOrd") ? decimal.Zero : row.Field <decimal>("dQtyOrd");
            entity.dtDue          = row.Field <DateTime?>("dtDue");
            entity.iOrderNo       = row.IsNull("iOrderNo") ? 0 : row.Field <int>("iOrderNo");
            entity.iOrderSuf      = row.IsNull("iOrderSuf") ? 0 : row.Field <int>("iOrderSuf");
            entity.iSortOrder     = row.IsNull("iSortOrder") ? 0 : row.Field <int>("iSortOrder");
            entity.lAssign        = row.Field <bool>("lAssign");
            entity.cOrderNotes    = row.IsNull("cOrderNotes") ? string.Empty : row.Field <string>("cOrderNotes");
            entity.cCustVendNotes = row.IsNull("cCustVendNotes") ? string.Empty : row.Field <string>("cCustVendNotes");
            entity.dVendNo        = row.IsNull("dVendNo") ? decimal.Zero : row.Field <decimal>("dVendNo");
            entity.dCustNo        = row.IsNull("dCustNo") ? decimal.Zero : row.Field <decimal>("dCustNo");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }