Exemplo n.º 1
0
        public int AddBon(long SerialNumber)
        {
            COM.Bon bon = new COM.Bon()
            {
                SerialNumber = SerialNumber
            };
            int result = BLL.Bon.AddBon(bon);

            return(result);
        }
Exemplo n.º 2
0
        public static int AddBon(COM.Bon bon)
        {
            try
            {
                using (var ent = DB.Entity)
                {
                    ent.Bons.Add(bon);
                    ent.SaveChanges();

                    return(bon.BID);
                }
            }
            catch (Exception e)
            {
                Log.DoLog(COM.Action.AddBonSerial, bon.SerialNumber.ToString(), -100, e.Message);
                return(-100);
            }
        }