コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPolinedetail(ref DataRow row, Polinedetail entity)
 {
     row.SetField("rt_id", entity.rtId);
     row.SetField("po_line", entity.poLine);
     row.SetField("abs_num", entity.absNum);
     row.SetField("exp_quantity", entity.expQuantity);
     row.SetField("act_quantity", entity.actQuantity);
     row.SetField("quantity", entity.quantity);
     row.SetField("item_desc", entity.itemDesc);
     row.SetField("polinedetailuserfield", entity.polinedetailuserfield);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Polinedetail BuildPolinedetailFromRow(DataRow row)
        {
            Polinedetail entity = new Polinedetail();

            entity.rtId                  = row.IsNull("rt_id") ? 0 : row.Field <int>("rt_id");
            entity.poLine                = row.IsNull("po_line") ? 0 : row.Field <int>("po_line");
            entity.absNum                = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num");
            entity.expQuantity           = row.IsNull("exp_quantity") ? decimal.Zero : row.Field <decimal>("exp_quantity");
            entity.actQuantity           = row.IsNull("act_quantity") ? decimal.Zero : row.Field <decimal>("act_quantity");
            entity.quantity              = row.IsNull("quantity") ? decimal.Zero : row.Field <decimal>("quantity");
            entity.itemDesc              = row.IsNull("item_desc") ? string.Empty : row.Field <string>("item_desc");
            entity.polinedetailuserfield = row.IsNull("polinedetailuserfield") ? string.Empty : row.Field <string>("polinedetailuserfield");
            entity.userfield             = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }