Example #1
0
        // POST: api/NVDonGoiMonApi
        public string Post(string ghiChu, string ban)
        {
            string ngay     = DateTime.Now.ToString("yyyy/MM/dd");
            string thoiGian = DateTime.Now.ToString("hh:mm:ss");
            string maDon    = DonGoiMonModel.InsertDonGoiMon(ngay, thoiGian, ghiChu, ban);

            return(maDon);
        }
        // GET: NhanVien/DonGoiMon
        public ActionResult Index()
        {
            //if (HttpContext.User.Identity.Name)
            var iplDonGoiMon = new DonGoiMonModel();
            var model        = iplDonGoiMon.ListAllDonGoiMonChuaGiao();

            return(View(model));
        }
Example #3
0
 // DELETE: api/NVDonGoiMonApi/5
 public string Delete(string maDon)
 {
     if (DonGoiMonModel.HuyDonGoiMon(maDon))
     {
         return("Huy thanh cong!");
     }
     else
     {
         return("Huy that bai!");
     }
 }
Example #4
0
 // PUT: api/NVDonGoiMonApi/5
 public string Put(string maDon, string trangThai)
 {
     if (DonGoiMonModel.SuaTrangThaiDonGoiMon(maDon, trangThai))
     {
         return("Sua thanh cong!");
     }
     else
     {
         return("Sua that bai!");
     }
 }