Example #1
0
        public bool AddWorkdone(Workdone workdone)
        {
            bool status = false;

            try
            {
                _context.Add(workdone);
                _context.SaveChanges();
                status = true;
            }
            catch (Exception ex)
            {
                status = false;
            }
            return(status);
        }
Example #2
0
        public bool EditWork(Workdone w)
        {
            bool status = false;

            try
            {
                var temp = _context.Workdone.Find(w.WorkId);
                temp.WorkDesr = w.WorkDesr;
                temp.Title    = w.Title;
                _context.SaveChanges();
                status = true;
                return(status);
            }
            catch (Exception ex)
            {
                status = false;
            }
            return(status);
        }
Example #3
0
 public void ToWork(Workdone workdone)
 {
     workdone(true);
 }