Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCcinvtranssummary(ref DataRow row, Ccinvtranssummary entity)
 {
     row.SetField("good_qty", entity.goodQty);
     row.SetField("disc_qty", entity.discQty);
     row.SetField("total_qty", entity.totalQty);
     row.SetField("requested_date", entity.requestedDate);
     row.SetField("started_date", entity.startedDate);
     row.SetField("completed_date", entity.completedDate);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Ccinvtranssummary BuildCcinvtranssummaryFromRow(DataRow row)
        {
            Ccinvtranssummary entity = new Ccinvtranssummary();

            entity.goodQty       = row.IsNull("good_qty") ? decimal.Zero : row.Field <decimal>("good_qty");
            entity.discQty       = row.IsNull("disc_qty") ? decimal.Zero : row.Field <decimal>("disc_qty");
            entity.totalQty      = row.IsNull("total_qty") ? decimal.Zero : row.Field <decimal>("total_qty");
            entity.requestedDate = row.IsNull("requested_date") ? string.Empty : row.Field <string>("requested_date");
            entity.startedDate   = row.IsNull("started_date") ? string.Empty : row.Field <string>("started_date");
            entity.completedDate = row.IsNull("completed_date") ? string.Empty : row.Field <string>("completed_date");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }