Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdemloadpdsc3criteria(ref DataRow row, Pdemloadpdsc3criteria entity)
 {
     row.SetField("cSetid", entity.cSetid);
     row.SetField("cCustType", entity.cCustType);
     row.SetField("cContractNo", entity.cContractNo);
     row.SetField("dtStartFrom", entity.dtStartFrom);
     row.SetField("dtStartTo", entity.dtStartTo);
     row.SetField("cLevel2Ty", entity.cLevel2Ty);
     row.SetField("cWhse", entity.cWhse);
     row.SetField("cProd", entity.cProd);
     row.SetField("cReference", entity.cReference);
     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);
 }
Exemple #2
0
        public static Pdemloadpdsc3criteria BuildPdemloadpdsc3criteriaFromRow(DataRow row)
        {
            Pdemloadpdsc3criteria entity = new Pdemloadpdsc3criteria();

            entity.cSetid        = row.IsNull("cSetid") ? string.Empty : row.Field <string>("cSetid");
            entity.cCustType     = row.IsNull("cCustType") ? string.Empty : row.Field <string>("cCustType");
            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.cWhse         = row.IsNull("cWhse") ? string.Empty : row.Field <string>("cWhse");
            entity.cProd         = row.IsNull("cProd") ? string.Empty : row.Field <string>("cProd");
            entity.cReference    = row.IsNull("cReference") ? string.Empty : row.Field <string>("cReference");
            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);
        }