예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadpoeacriteria(ref DataRow row, Loadpoeacriteria entity)
 {
     row.SetField("buyer", entity.buyer);
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("vendno", entity.vendno);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("whse", entity.whse);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Loadpoeacriteria BuildLoadpoeacriteriaFromRow(DataRow row)
        {
            Loadpoeacriteria entity = new Loadpoeacriteria();

            entity.buyer            = row.IsNull("buyer") ? string.Empty : row.Field <string>("buyer");
            entity.pono             = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf            = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.vendno           = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.stagecd          = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.whse             = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }