示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPoblanketlinesresults(ref DataRow row, Poblanketlinesresults entity)
 {
     row.SetField("lineno", entity.lineno);
     row.SetField("commentfl", entity.commentfl);
     row.SetField("nonstockty", entity.nonstockty);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("prodnotesfl", entity.prodnotesfl);
     row.SetField("unit", entity.unit);
     row.SetField("descrip", entity.descrip);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("qtyord-orig", entity.qtyordOrig);
     row.SetField("ordered", entity.ordered);
     row.SetField("qtyremain", entity.qtyremain);
     row.SetField("allowedit", entity.allowedit);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Poblanketlinesresults BuildPoblanketlinesresultsFromRow(DataRow row)
        {
            Poblanketlinesresults entity = new Poblanketlinesresults();

            entity.lineno      = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.commentfl   = row.Field <bool>("commentfl");
            entity.nonstockty  = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty");
            entity.shipprod    = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.prodnotesfl = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl");
            entity.unit        = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.descrip     = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.qtyord      = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.qtyordOrig  = row.IsNull("qtyord-orig") ? decimal.Zero : row.Field <decimal>("qtyord-orig");
            entity.ordered     = row.IsNull("ordered") ? decimal.Zero : row.Field <decimal>("ordered");
            entity.qtyremain   = row.IsNull("qtyremain") ? decimal.Zero : row.Field <decimal>("qtyremain");
            entity.allowedit   = row.Field <bool>("allowedit");
            entity.msdsfl      = row.Field <bool>("msdsfl");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }