Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOtetaddpolines(ref DataRow row, Otetaddpolines entity)
 {
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("polineno", entity.polineno);
     row.SetField("poqtyord", entity.poqtyord);
     row.SetField("unit", entity.unit);
     row.SetField("prod", entity.prod);
     row.SetField("selectfl", entity.selectfl);
     row.SetField("stkqtyord", entity.stkqtyord);
     row.SetField("lineamt", entity.lineamt);
     row.SetField("cubes", entity.cubes);
     row.SetField("weight", entity.weight);
     row.SetField("price", entity.price);
     row.SetField("trackno", entity.trackno);
     row.SetField("whse", entity.whse);
     row.SetField("pomaxqty", entity.pomaxqty);
     row.SetField("tracknowhse", entity.tracknowhse);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Otetaddpolines BuildOtetaddpolinesFromRow(DataRow row)
        {
            Otetaddpolines entity = new Otetaddpolines();

            entity.pono        = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf       = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.polineno    = row.IsNull("polineno") ? 0 : row.Field <int>("polineno");
            entity.poqtyord    = row.IsNull("poqtyord") ? decimal.Zero : row.Field <decimal>("poqtyord");
            entity.unit        = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.prod        = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.selectfl    = row.Field <bool>("selectfl");
            entity.stkqtyord   = row.IsNull("stkqtyord") ? decimal.Zero : row.Field <decimal>("stkqtyord");
            entity.lineamt     = row.IsNull("lineamt") ? decimal.Zero : row.Field <decimal>("lineamt");
            entity.cubes       = row.IsNull("cubes") ? decimal.Zero : row.Field <decimal>("cubes");
            entity.weight      = row.IsNull("weight") ? decimal.Zero : row.Field <decimal>("weight");
            entity.price       = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price");
            entity.trackno     = row.IsNull("trackno") ? 0 : row.Field <int>("trackno");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.pomaxqty    = row.IsNull("pomaxqty") ? decimal.Zero : row.Field <decimal>("pomaxqty");
            entity.tracknowhse = row.IsNull("tracknowhse") ? string.Empty : row.Field <string>("tracknowhse");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }