Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPorrarreptcombinqresults(ref DataRow row, Porrarreptcombinqresults entity)
 {
     row.SetField("reportno", entity.reportno);
     row.SetField("prodline", entity.prodline);
     row.SetField("whse", entity.whse);
     row.SetField("s-lineno", entity.sLineno);
     row.SetField("s-total", entity.sTotal);
     row.SetField("s-total-fl", entity.sTotalFl);
     row.SetField("s-target", entity.sTarget);
     row.SetField("s-combine-fl", entity.sCombineFl);
     row.SetField("s-reason", entity.sReason);
 }
Exemplo n.º 2
0
        public static Porrarreptcombinqresults BuildPorrarreptcombinqresultsFromRow(DataRow row)
        {
            Porrarreptcombinqresults entity = new Porrarreptcombinqresults();

            entity.reportno   = row.IsNull("reportno") ? 0 : row.Field <int>("reportno");
            entity.prodline   = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.sLineno    = row.IsNull("s-lineno") ? 0 : row.Field <int>("s-lineno");
            entity.sTotal     = row.IsNull("s-total") ? decimal.Zero : row.Field <decimal>("s-total");
            entity.sTotalFl   = row.IsNull("s-total-fl") ? string.Empty : row.Field <string>("s-total-fl");
            entity.sTarget    = row.IsNull("s-target") ? decimal.Zero : row.Field <decimal>("s-target");
            entity.sCombineFl = row.IsNull("s-combine-fl") ? string.Empty : row.Field <string>("s-combine-fl");
            entity.sReason    = row.IsNull("s-reason") ? string.Empty : row.Field <string>("s-reason");
            return(entity);
        }