// // GET: /Default1/ public ActionResult Index(int madattiec) { QLTCDataContext qltc = new QLTCDataContext(); DatTiec dt = qltc.DatTiecs.Where(d => d.MaDacTiec == madattiec).FirstOrDefault(); return(View(dt)); }
public ActionResult hoanthanhtiec(int id) { DatTiec tt = qltc.DatTiecs.Where(d => d.MaDacTiec == id).FirstOrDefault(); tt.TrangThai = "Đã hoàn thành"; qltc.SubmitChanges(); var dt = from a in qltc.DatTiecs where a.TrangThai == "Đã xác nhận" select a; return(RedirectToAction("Index", "Ad_Home")); }
private void btThemTiec_Click(object sender, EventArgs e) { datTiec.Show(); datTiec = new DatTiec(); }