예제 #1
0
        public Encashment EditEncashment(int id, decimal writeOff)
        {
            Encashment p = cont.Encashment.SingleOrDefault(ca => ca.Id == id);

            p.WriteOff = writeOff;

            cont.SaveChanges();
            return(p);
        }
예제 #2
0
        public Encashment AddEncashment(decimal writeOff, Branch branch)
        {
            Encashment p = new Encashment
            {
                Date     = DateTime.Now,
                WriteOff = writeOff,
                Branch   = branch,
            };

            cont.Encashment.Add(p);
            cont.SaveChanges();
            return(p);
        }