Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOpencountscustomer2(ref DataRow row, Opencountscustomer2 entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("ch_cust_name", entity.chCustName);
     row.SetField("ch_cust_code", entity.chCustCode);
     row.SetField("orders", entity.orders);
     row.SetField("lines", entity.lines);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Opencountscustomer2 BuildOpencountscustomer2FromRow(DataRow row)
        {
            Opencountscustomer2 entity = new Opencountscustomer2();

            entity.coNum      = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num");
            entity.whNum      = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num");
            entity.chCustName = row.IsNull("ch_cust_name") ? string.Empty : row.Field <string>("ch_cust_name");
            entity.chCustCode = row.IsNull("ch_cust_code") ? string.Empty : row.Field <string>("ch_cust_code");
            entity.orders     = row.IsNull("orders") ? 0 : row.Field <int>("orders");
            entity.lines      = row.IsNull("lines") ? 0 : row.Field <int>("lines");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }