Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPoorderlookupcriteria(ref DataRow row, Poorderlookupcriteria entity)
 {
     row.SetField("vendno", entity.vendno);
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("openonly", entity.openonly);
     row.SetField("transtype", entity.transtype);
     row.SetField("stage", entity.stage);
     row.SetField("receiverno", entity.receiverno);
     row.SetField("approvty", entity.approvty);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("customfield", entity.customfield);
 }
Пример #2
0
        public static Poorderlookupcriteria BuildPoorderlookupcriteriaFromRow(DataRow row)
        {
            Poorderlookupcriteria entity = new Poorderlookupcriteria();

            entity.vendno           = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.pono             = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf            = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.openonly         = row.Field <bool>("openonly");
            entity.transtype        = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.stage            = row.IsNull("stage") ? string.Empty : row.Field <string>("stage");
            entity.receiverno       = row.IsNull("receiverno") ? string.Empty : row.Field <string>("receiverno");
            entity.approvty         = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.customfield      = row.IsNull("customfield") ? string.Empty : row.Field <string>("customfield");
            return(entity);
        }