コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPorrarreptupdatetotals(ref DataRow row, Porrarreptupdatetotals entity)
 {
     row.SetField("mergeamount", entity.mergeamount);
     row.SetField("mergecubes", entity.mergecubes);
     row.SetField("mergeweight", entity.mergeweight);
     row.SetField("mergeqtyordered", entity.mergeqtyordered);
     row.SetField("totalamount", entity.totalamount);
     row.SetField("totalcubes", entity.totalcubes);
     row.SetField("totalweight", entity.totalweight);
     row.SetField("totalqtyordered", entity.totalqtyordered);
 }
コード例 #2
0
        public static Porrarreptupdatetotals BuildPorrarreptupdatetotalsFromRow(DataRow row)
        {
            Porrarreptupdatetotals entity = new Porrarreptupdatetotals();

            entity.mergeamount     = row.IsNull("mergeamount") ? decimal.Zero : row.Field <decimal>("mergeamount");
            entity.mergecubes      = row.IsNull("mergecubes") ? decimal.Zero : row.Field <decimal>("mergecubes");
            entity.mergeweight     = row.IsNull("mergeweight") ? decimal.Zero : row.Field <decimal>("mergeweight");
            entity.mergeqtyordered = row.IsNull("mergeqtyordered") ? decimal.Zero : row.Field <decimal>("mergeqtyordered");
            entity.totalamount     = row.IsNull("totalamount") ? decimal.Zero : row.Field <decimal>("totalamount");
            entity.totalcubes      = row.IsNull("totalcubes") ? decimal.Zero : row.Field <decimal>("totalcubes");
            entity.totalweight     = row.IsNull("totalweight") ? decimal.Zero : row.Field <decimal>("totalweight");
            entity.totalqtyordered = row.IsNull("totalqtyordered") ? decimal.Zero : row.Field <decimal>("totalqtyordered");
            return(entity);
        }