// 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)); }
// DELETE: api/NVDonGoiMonApi/5 public string Delete(string maDon) { if (DonGoiMonModel.HuyDonGoiMon(maDon)) { return("Huy thanh cong!"); } else { return("Huy that bai!"); } }
// 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!"); } }