Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelinecrjur(ref DataRow row, Oelinecrjur entity)
 {
     row.SetField("ordertype", entity.ordertype);
     row.SetField("orderaltno", entity.orderaltno);
     row.SetField("orderaltsuf", entity.orderaltsuf);
     row.SetField("botype", entity.botype);
     row.SetField("powtintfl", entity.powtintfl);
     row.SetField("vendno", entity.vendno);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("whse", entity.whse);
     row.SetField("name", entity.name);
     row.SetField("addr1", entity.addr1);
     row.SetField("addr2", entity.addr2);
     row.SetField("addr3", entity.addr3);
     row.SetField("city", entity.city);
     row.SetField("state", entity.state);
     row.SetField("zipcd", entity.zipcd);
     row.SetField("geocd", entity.geocd);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Oelinecrjur BuildOelinecrjurFromRow(DataRow row)
        {
            Oelinecrjur entity = new Oelinecrjur();

            entity.ordertype   = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.orderaltno  = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno");
            entity.orderaltsuf = row.IsNull("orderaltsuf") ? 0 : row.Field <int>("orderaltsuf");
            entity.botype      = row.IsNull("botype") ? string.Empty : row.Field <string>("botype");
            entity.powtintfl   = row.Field <bool>("powtintfl");
            entity.vendno      = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.shipfmno    = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.name        = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.addr1       = row.IsNull("addr1") ? string.Empty : row.Field <string>("addr1");
            entity.addr2       = row.IsNull("addr2") ? string.Empty : row.Field <string>("addr2");
            entity.addr3       = row.IsNull("addr3") ? string.Empty : row.Field <string>("addr3");
            entity.city        = row.IsNull("city") ? string.Empty : row.Field <string>("city");
            entity.state       = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.zipcd       = row.IsNull("zipcd") ? string.Empty : row.Field <string>("zipcd");
            entity.geocd       = row.IsNull("geocd") ? 0 : row.Field <int>("geocd");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }