Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdemloadpdsc2criteria(ref DataRow row, Pdemloadpdsc2criteria entity)
 {
     row.SetField("cSetid", entity.cSetid);
     row.SetField("deCustNo", entity.deCustNo);
     row.SetField("cShipTo", entity.cShipTo);
     row.SetField("cContractNo", entity.cContractNo);
     row.SetField("dtStartFrom", entity.dtStartFrom);
     row.SetField("dtStartTo", entity.dtStartTo);
     row.SetField("cLevel2Ty", entity.cLevel2Ty);
     row.SetField("deVendNo", entity.deVendNo);
     row.SetField("cReference", entity.cReference);
     row.SetField("cWhse", entity.cWhse);
     row.SetField("dtEndFrom", entity.dtEndFrom);
     row.SetField("dtEndTo", entity.dtEndTo);
     row.SetField("lRefresh-click", entity.lRefreshClick);
     row.SetField("cRegion", entity.cRegion);
     row.SetField("rebsubty", entity.rebsubty);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Pdemloadpdsc2criteria BuildPdemloadpdsc2criteriaFromRow(DataRow row)
        {
            Pdemloadpdsc2criteria entity = new Pdemloadpdsc2criteria();

            entity.cSetid        = row.IsNull("cSetid") ? string.Empty : row.Field <string>("cSetid");
            entity.deCustNo      = row.IsNull("deCustNo") ? decimal.Zero : row.Field <decimal>("deCustNo");
            entity.cShipTo       = row.IsNull("cShipTo") ? string.Empty : row.Field <string>("cShipTo");
            entity.cContractNo   = row.IsNull("cContractNo") ? string.Empty : row.Field <string>("cContractNo");
            entity.dtStartFrom   = row.Field <DateTime?>("dtStartFrom");
            entity.dtStartTo     = row.Field <DateTime?>("dtStartTo");
            entity.cLevel2Ty     = row.IsNull("cLevel2Ty") ? string.Empty : row.Field <string>("cLevel2Ty");
            entity.deVendNo      = row.IsNull("deVendNo") ? decimal.Zero : row.Field <decimal>("deVendNo");
            entity.cReference    = row.IsNull("cReference") ? string.Empty : row.Field <string>("cReference");
            entity.cWhse         = row.IsNull("cWhse") ? string.Empty : row.Field <string>("cWhse");
            entity.dtEndFrom     = row.Field <DateTime?>("dtEndFrom");
            entity.dtEndTo       = row.Field <DateTime?>("dtEndTo");
            entity.lRefreshClick = row.Field <bool>("lRefresh-click");
            entity.cRegion       = row.IsNull("cRegion") ? string.Empty : row.Field <string>("cRegion");
            entity.rebsubty      = row.IsNull("rebsubty") ? string.Empty : row.Field <string>("rebsubty");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }