Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPorrarlineprogbuywhses(ref DataRow row, Porrarlineprogbuywhses entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("reportno", entity.reportno);
     row.SetField("lineno", entity.lineno);
     row.SetField("seqno", entity.seqno);
     row.SetField("whse", entity.whse);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("stkqtyord", entity.stkqtyord);
     row.SetField("dnetamt", entity.dnetamt);
     row.SetField("qtybo", entity.qtybo);
     row.SetField("usagerate", entity.usagerate);
     row.SetField("class", entity.@class);
     row.SetField("startmth", entity.startmth);
     row.SetField("justdeleted", entity.justdeleted);
     row.SetField("hasbeenmodified", entity.hasbeenmodified);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Porrarlineprogbuywhses BuildPorrarlineprogbuywhsesFromRow(DataRow row)
        {
            Porrarlineprogbuywhses entity = new Porrarlineprogbuywhses();

            entity.cono            = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.reportno        = row.IsNull("reportno") ? 0 : row.Field <int>("reportno");
            entity.lineno          = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.seqno           = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.qtyord          = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.stkqtyord       = row.IsNull("stkqtyord") ? decimal.Zero : row.Field <decimal>("stkqtyord");
            entity.dnetamt         = row.IsNull("dnetamt") ? decimal.Zero : row.Field <decimal>("dnetamt");
            entity.qtybo           = row.IsNull("qtybo") ? decimal.Zero : row.Field <decimal>("qtybo");
            entity.usagerate       = row.IsNull("usagerate") ? decimal.Zero : row.Field <decimal>("usagerate");
            entity.@class          = row.IsNull("class") ? 0 : row.Field <int>("class");
            entity.startmth        = row.IsNull("startmth") ? 0 : row.Field <int>("startmth");
            entity.justdeleted     = row.Field <bool>("justdeleted");
            entity.hasbeenmodified = row.Field <bool>("hasbeenmodified");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }