Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOpencountscarrier(ref DataRow row, Opencountscarrier entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("ch_car", entity.chCar);
     row.SetField("ch_ser", entity.chSer);
     row.SetField("ch_car_desc", entity.chCarDesc);
     row.SetField("ch_ser_desc", entity.chSerDesc);
     row.SetField("i_qty", entity.iQty);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Opencountscarrier BuildOpencountscarrierFromRow(DataRow row)
        {
            Opencountscarrier entity = new Opencountscarrier();

            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.chCar     = row.IsNull("ch_car") ? string.Empty : row.Field <string>("ch_car");
            entity.chSer     = row.IsNull("ch_ser") ? string.Empty : row.Field <string>("ch_ser");
            entity.chCarDesc = row.IsNull("ch_car_desc") ? string.Empty : row.Field <string>("ch_car_desc");
            entity.chSerDesc = row.IsNull("ch_ser_desc") ? string.Empty : row.Field <string>("ch_ser_desc");
            entity.iQty      = row.IsNull("i_qty") ? 0 : row.Field <int>("i_qty");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }