Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeiftiedorders(ref DataRow row, Oeiftiedorders entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("promisedt", entity.promisedt);
     row.SetField("totqtyord", entity.totqtyord);
     row.SetField("totqtyshp", entity.totqtyshp);
     row.SetField("consolorderno", entity.consolorderno);
     row.SetField("whse", entity.whse);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Oeiftiedorders BuildOeiftiedordersFromRow(DataRow row)
        {
            Oeiftiedorders entity = new Oeiftiedorders();

            entity.orderno       = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf      = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.custno        = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto        = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.stagecd       = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.reqshipdt     = row.Field <DateTime?>("reqshipdt");
            entity.promisedt     = row.Field <DateTime?>("promisedt");
            entity.totqtyord     = row.IsNull("totqtyord") ? decimal.Zero : row.Field <decimal>("totqtyord");
            entity.totqtyshp     = row.IsNull("totqtyshp") ? decimal.Zero : row.Field <decimal>("totqtyshp");
            entity.consolorderno = row.IsNull("consolorderno") ? 0 : row.Field <int>("consolorderno");
            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }