Ejemplo n.º 1
0
 public Item(string _name, string _quantityUnit, Section _section, string _brand, int _ReserveStock)
 {
     this.Name = _name;
     this.QuantityUnit = _quantityUnit;
     this.Section = _section;
     this.Brand = _brand;
     this.ReserveStock = _ReserveStock;
 }
Ejemplo n.º 2
0
 public static int SaveSection(Section section)
 {
     using (var session = NHibernateHelper.OpenSession())
     {
         using (var tx = session.BeginTransaction())
             try
             {
                 session.SaveOrUpdate(section);
                 tx.Commit();
                 log.Info("Section Saved");
                 return section.ID;
             }
             catch (Exception ex)
             {
                 tx.Rollback();
                 log.Error(ex);
                 return 0;
             }
     }
 }