示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeblanketbannersingle(ref DataRow row, Oeblanketbannersingle entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("transtype", entity.transtype);
     row.SetField("custno", entity.custno);
     row.SetField("custnotesfl", entity.custnotesfl);
     row.SetField("shipto", entity.shipto);
     row.SetField("shiptonotesfl", entity.shiptonotesfl);
     row.SetField("whse", entity.whse);
     row.SetField("custpo", entity.custpo);
     row.SetField("boflag", entity.boflag);
     row.SetField("stage", entity.stage);
     row.SetField("name", entity.name);
     row.SetField("resetstagefl", entity.resetstagefl);
     row.SetField("openinit", entity.openinit);
     row.SetField("saleswhse", entity.saleswhse);
     row.SetField("arscrowid", entity.arscrowid.ToByteArray());
     row.SetField("arssrowid", entity.arssrowid.ToByteArray());
 }
示例#2
0
        public static Oeblanketbannersingle BuildOeblanketbannersingleFromRow(DataRow row)
        {
            Oeblanketbannersingle entity = new Oeblanketbannersingle();

            entity.orderno       = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf      = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.transtype     = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.custno        = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custnotesfl   = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl");
            entity.shipto        = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.shiptonotesfl = row.IsNull("shiptonotesfl") ? string.Empty : row.Field <string>("shiptonotesfl");
            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.custpo        = row.IsNull("custpo") ? string.Empty : row.Field <string>("custpo");
            entity.boflag        = row.IsNull("boflag") ? string.Empty : row.Field <string>("boflag");
            entity.stage         = row.IsNull("stage") ? string.Empty : row.Field <string>("stage");
            entity.name          = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.resetstagefl  = row.Field <bool>("resetstagefl");
            entity.openinit      = row.IsNull("openinit") ? string.Empty : row.Field <string>("openinit");
            entity.saleswhse     = row.IsNull("saleswhse") ? string.Empty : row.Field <string>("saleswhse");
            entity.arscrowid     = row.Field <byte[]>("arscrowid").ToStringEncoded();
            entity.arssrowid     = row.Field <byte[]>("arssrowid").ToStringEncoded();
            return(entity);
        }