Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdergetitemcriteria(ref DataRow row, Pdergetitemcriteria entity)
 {
     row.SetField("claimno", entity.claimno);
     row.SetField("rebateType", entity.rebateType);
     row.SetField("invoicefromdate", entity.invoicefromdate);
     row.SetField("invoicetodate", entity.invoicetodate);
     row.SetField("statustype", entity.statustype);
     row.SetField("contract", entity.contract);
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("custno", entity.custno);
     row.SetField("orderno", entity.orderno);
     row.SetField("pono", entity.pono);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("secure", entity.secure);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Pdergetitemcriteria BuildPdergetitemcriteriaFromRow(DataRow row)
        {
            Pdergetitemcriteria entity = new Pdergetitemcriteria();

            entity.claimno          = row.IsNull("claimno") ? 0 : row.Field <int>("claimno");
            entity.rebateType       = row.IsNull("rebateType") ? string.Empty : row.Field <string>("rebateType");
            entity.invoicefromdate  = row.Field <DateTime?>("invoicefromdate");
            entity.invoicetodate    = row.Field <DateTime?>("invoicetodate");
            entity.statustype       = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.contract         = row.IsNull("contract") ? string.Empty : row.Field <string>("contract");
            entity.prod             = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse             = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.custno           = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.orderno          = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.pono             = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.secure           = row.IsNull("secure") ? 0 : row.Field <int>("secure");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }