Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdemloadpdsrcriteria(ref DataRow row, Pdemloadpdsrcriteria entity)
 {
     row.SetField("cSetid", entity.cSetid);
     row.SetField("deVendno", entity.deVendno);
     row.SetField("deCustNo", entity.deCustNo);
     row.SetField("cProd", entity.cProd);
     row.SetField("cContractNo", entity.cContractNo);
     row.SetField("cShipTo", entity.cShipTo);
     row.SetField("cWhse", entity.cWhse);
     row.SetField("cCustRebType", entity.cCustRebType);
     row.SetField("cTypeFld", entity.cTypeFld);
     row.SetField("cRebSubty", entity.cRebSubty);
     row.SetField("dtStartFrom", entity.dtStartFrom);
     row.SetField("dtStartTo", entity.dtStartTo);
     row.SetField("dtEndFrom", entity.dtEndFrom);
     row.SetField("dtEndTo", entity.dtEndTo);
     row.SetField("lRefresh-click", entity.lRefreshClick);
     row.SetField("cRegion", entity.cRegion);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Pdemloadpdsrcriteria BuildPdemloadpdsrcriteriaFromRow(DataRow row)
        {
            Pdemloadpdsrcriteria entity = new Pdemloadpdsrcriteria();

            entity.cSetid        = row.IsNull("cSetid") ? string.Empty : row.Field <string>("cSetid");
            entity.deVendno      = row.IsNull("deVendno") ? decimal.Zero : row.Field <decimal>("deVendno");
            entity.deCustNo      = row.IsNull("deCustNo") ? decimal.Zero : row.Field <decimal>("deCustNo");
            entity.cProd         = row.IsNull("cProd") ? string.Empty : row.Field <string>("cProd");
            entity.cContractNo   = row.IsNull("cContractNo") ? string.Empty : row.Field <string>("cContractNo");
            entity.cShipTo       = row.IsNull("cShipTo") ? string.Empty : row.Field <string>("cShipTo");
            entity.cWhse         = row.IsNull("cWhse") ? string.Empty : row.Field <string>("cWhse");
            entity.cCustRebType  = row.IsNull("cCustRebType") ? string.Empty : row.Field <string>("cCustRebType");
            entity.cTypeFld      = row.IsNull("cTypeFld") ? string.Empty : row.Field <string>("cTypeFld");
            entity.cRebSubty     = row.IsNull("cRebSubty") ? string.Empty : row.Field <string>("cRebSubty");
            entity.dtStartFrom   = row.Field <DateTime?>("dtStartFrom");
            entity.dtStartTo     = row.Field <DateTime?>("dtStartTo");
            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.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }