public ActionResult AddNew(TaiKhoan obj) { if (obj.TaiKhoan1 != null && obj.MatKhau != null) { int id = dao.AddNew(obj); if (id != -1) { return(RedirectToAction("Index", "TaiKhoan")); } else { ViewBag.Message("Them moi khong thanh cong"); return(RedirectToAction("AddNew", "TaiKhoan")); } } else { ModelState.AddModelError("", "Bạn phải nhập vào trường này"); } LoaiTaiKhoanDAO tkdao = new LoaiTaiKhoanDAO(); var ltk = tkdao.ListOf(); ViewBag.ltk = ltk; return(View()); }
public JsonResult GetListLoaiTaikhoan() { var dao = new LoaiTaiKhoanDAO(); var result = dao.GetListLoaiTK(); return(Json(result, JsonRequestBehavior.AllowGet)); }
public static bool ThemLoaiTaiKhoan(LoaiTaiKhoanDTO loaiTaiKhoan, List <ChucNang_LoaiTaiKhoanDTO> lsChucNang_LoaiTaiKhoan) { if (LoaiTaiKhoanDAO.ThemLoaiTaiKhoan(loaiTaiKhoan)) { return(ChucNang_LoaiTaiKhoanBUS.ThemChucNang_LoaiTaiKhoan(lsChucNang_LoaiTaiKhoan)); } return(false); }
public static bool KhoiPhucLoaiTaiKhoan(int maLoaiTaiKhoan) { if (LoaiTaiKhoanDAO.KhoiPhucLoaiTaiKhoan(maLoaiTaiKhoan)) { return(TaiKhoanDAO.KhoiPhucTaiKhoanTheoLoai(maLoaiTaiKhoan)); } return(false); }
public static bool SuaLoaiTaiKhoan(LoaiTaiKhoanDTO loaiTaiKhoan, List <ChucNang_LoaiTaiKhoanDTO> lsChucNang_LoaiTaiKhoan) { if (ChucNang_LoaiTaiKhoanBUS.SuaChucNang_LoaiTaiKhoan(loaiTaiKhoan.MaLoaiTaiKhoan, lsChucNang_LoaiTaiKhoan)) { return(LoaiTaiKhoanDAO.SuaLoaiTaiKhoan(loaiTaiKhoan)); } return(false); }
public ActionResult AddNew() { LoaiTaiKhoanDAO tkdao = new LoaiTaiKhoanDAO(); var ltk = tkdao.ListOf(); ViewBag.ltk = ltk; return(View()); }
public ActionResult Update(int id) { LoaiTaiKhoanDAO tkdao = new LoaiTaiKhoanDAO(); var ltk = tkdao.ListOf(); ViewBag.ltk = ltk; var up = dao.Detail(id); return(View(up)); }
public static bool XoaLoaiTaiKhoan(int maLoaiTaiKhoan) { if (TaiKhoanBUS.XoaTaiKhoanTheoLoai(maLoaiTaiKhoan)) { //if (ChucNang_LoaiTaiKhoanBUS.XoaChucNang_LoaiTaiKhoan(maLoaiTaiKhoan)) //{ return(LoaiTaiKhoanDAO.XoaLoaiTaiKhoan(maLoaiTaiKhoan)); //} } return(false); }
public JsonResult Delete(string id) { var dao = new LoaiTaiKhoanDAO(); bool value = dao.Delete(id); if (value) { SetAlert("Xóa thành công", "success"); } else { SetAlert("Không thể xóa nhóm quyền", "warning"); } return(Json(value, JsonRequestBehavior.AllowGet)); }
public ActionResult SaveData(LoaitaiKhoanModel sp) { int result = 0; bool kq = false; if (ModelState.IsValid) { var dao = new LoaiTaiKhoanDAO(); string user = ((UserLogin)Session[CommonStants.USER_SESSION]).userName; result = dao.SaveData(sp, user); if (result == 1) { kq = true; } else if (result == 2) { kq = true; } } return(Json(kq, JsonRequestBehavior.AllowGet)); }
public List <LoaiTaiKhoanDTO> DanhSachLoaiTK() { LoaiTaiKhoanDAO b = new LoaiTaiKhoanDAO(); return(b.dsloaiND()); }
public JsonResult GetListLoaiTaikhoanByID(string ID) { var value = new LoaiTaiKhoanDAO().GetListLoaiTaikhoanByID(ID); return(Json(value, JsonRequestBehavior.AllowGet)); }
static LoaiTaiKhoanBUS() { db = new LoaiTaiKhoanDAO(); }
public void getallTypeUser(long?selectedId = null) { var dao = new LoaiTaiKhoanDAO(); ViewBag.IDLOAITAIKHOAN = new SelectList(dao.GetListLoaiTK(), "IDLOAITAIKHOAN", "TENLOAITAIKHOAN", selectedId); }
public static int LayMaLoaiTaiKhoanMoiNhat() { return(LoaiTaiKhoanDAO.LayMaLoaiTaiKhoanMoiNhat()); }
public static List <LoaiTaiKhoanDTO> LayDanhSachLoaiTaiKhoan(string timKiem = "", bool trangThai = true) { return(LoaiTaiKhoanDAO.LayDanhSachLoaiTaiKhoan(timKiem, trangThai)); }
public static List <LoaiTaiKhoanDTO> LayDanhSachTatCaLoaiTaiKhoan() { return(LoaiTaiKhoanDAO.LayDanhSachTatCaLoaiTaiKhoan()); }
public bool CapNhatDSLoaiTK(LoaiTaiKhoanDTO loai) { LoaiTaiKhoanDAO a = new LoaiTaiKhoanDAO(); return(a.CapNhatDSLoaiTK(loai)); }