Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromItemintrans(ref DataRow row, Itemintrans entity)
 {
     row.SetField("rt_num", entity.rtNum);
     row.SetField("lot", entity.lot);
     row.SetField("quantity", entity.quantity);
     row.SetField("name", entity.name);
     row.SetField("delivery", entity.delivery);
     row.SetField("itemintransuserfield", entity.itemintransuserfield);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Itemintrans BuildItemintransFromRow(DataRow row)
        {
            Itemintrans entity = new Itemintrans();

            entity.rtNum                = row.IsNull("rt_num") ? string.Empty : row.Field <string>("rt_num");
            entity.lot                  = row.IsNull("lot") ? string.Empty : row.Field <string>("lot");
            entity.quantity             = row.IsNull("quantity") ? decimal.Zero : row.Field <decimal>("quantity");
            entity.name                 = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.delivery             = row.Field <DateTime?>("delivery");
            entity.itemintransuserfield = row.IsNull("itemintransuserfield") ? string.Empty : row.Field <string>("itemintransuserfield");
            entity.userfield            = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }