protected void Page_Load(object sender, EventArgs e) { if (Convert.ToString(Session["TenDangNhap"]) == "") { Response.Redirect("~/dangnhap.aspx"); } ndungDAL = new clsNguoiDung_DAL(); ndungDTO = new clsNguoiDung_DTO(); dthiDAL = new clsDiaDiemThi_DAL(); dthiDTO = new clsDiaDiemThi_DTO(); nhomNDDAL = new clsNhomNguoiDung_DAL(); nhomNDDTO = new clsNhomNguoiDung_DTO(); cmn = new clsCommon(); loadMasterData(); if (cboDienThi.Value != null) { //dotthiDTO.MaLoaiBang = cboLoaiBang.Value.ToString(); ndungDTO.MaDiemThi = cboDienThi.Value.ToString(); gvNguoiDung.DataSource = loadDataToUI(); gvNguoiDung.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (Convert.ToString(Session["TenDangNhap"]) == "") Response.Redirect("~/dangnhap.aspx"); nhomNDDAL = new clsNhomNguoiDung_DAL(); nhomNDDTO = new clsNhomNguoiDung_DTO(); cmn = new clsCommon(); gvNhomNguoiDung.DataSource = loadDataToUI(); gvNhomNguoiDung.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (Convert.ToString(Session["TenDangNhap"]) == "") { Response.Redirect("~/dangnhap.aspx"); } nhomNDDAL = new clsNhomNguoiDung_DAL(); nhomNDDTO = new clsNhomNguoiDung_DTO(); cmn = new clsCommon(); gvNhomNguoiDung.DataSource = loadDataToUI(); gvNhomNguoiDung.DataBind(); }
public int Delete(clsNhomNguoiDung_DTO nhomndDTO) { try { ListDictionary _list = new ListDictionary(); _list.Add("MaNhom", nhomndDTO.MaNhom); int iReturn = obj.ExcSql("Delete_Nhom_Nguoi_Dung", _list, CommandType.StoredProcedure); return iReturn; } catch (Exception) { //return ex.Message; return -1111; } }
public int Delete(clsNhomNguoiDung_DTO nhomndDTO) { try { ListDictionary _list = new ListDictionary(); _list.Add("MaNhom", nhomndDTO.MaNhom); int iReturn = obj.ExcSql("Delete_Nhom_Nguoi_Dung", _list, CommandType.StoredProcedure); return(iReturn); } catch (Exception) { //return ex.Message; return(-1111); } }
public DataTable getNhomNguoiDung(clsNhomNguoiDung_DTO nhomndDTO) { ListDictionary _list = new ListDictionary(); _list.Add("MaNhom", nhomndDTO.MaNhom); _list.Add("TenNhom", nhomndDTO.TenNhom); DataTable dt = new DataTable(); try { dt = obj.GetDataTable("Select_Nhom_Nguoi_Dung", CommandType.StoredProcedure); } catch { dt = null; } return dt; }
public int InsertUpdate(clsNhomNguoiDung_DTO nhomndDTO) { try { ListDictionary _list = new ListDictionary(); _list.Add("old_id", nhomndDTO.OldID); _list.Add("MaNhom", nhomndDTO.MaNhom); _list.Add("TenNhom", nhomndDTO.TenNhom); int iReturn = obj.ExcSql("Insert_Update_Nhom_Nguoi_Dung", _list, CommandType.StoredProcedure); return iReturn; } catch (Exception) { //return ex.Message; return -1111; // Đặt số này làm ngoại lệ ko lường trước được. ở StoredProcedure không được return có số này tránh trường hợp trùng } }
public int InsertUpdate(clsNhomNguoiDung_DTO nhomndDTO) { try { ListDictionary _list = new ListDictionary(); _list.Add("old_id", nhomndDTO.OldID); _list.Add("MaNhom", nhomndDTO.MaNhom); _list.Add("TenNhom", nhomndDTO.TenNhom); int iReturn = obj.ExcSql("Insert_Update_Nhom_Nguoi_Dung", _list, CommandType.StoredProcedure); return(iReturn); } catch (Exception) { //return ex.Message; return(-1111); // Đặt số này làm ngoại lệ ko lường trước được. ở StoredProcedure không được return có số này tránh trường hợp trùng } }
public DataTable getNhomNguoiDung(clsNhomNguoiDung_DTO nhomndDTO) { ListDictionary _list = new ListDictionary(); _list.Add("MaNhom", nhomndDTO.MaNhom); _list.Add("TenNhom", nhomndDTO.TenNhom); DataTable dt = new DataTable(); try { dt = obj.GetDataTable("Select_Nhom_Nguoi_Dung", CommandType.StoredProcedure); } catch { dt = null; } return(dt); }
protected void Page_Load(object sender, EventArgs e) { if (Convert.ToString(Session["TenDangNhap"]) == "") Response.Redirect("~/dangnhap.aspx"); ndungDAL = new clsNguoiDung_DAL(); ndungDTO = new clsNguoiDung_DTO(); dthiDAL = new clsDiaDiemThi_DAL(); dthiDTO = new clsDiaDiemThi_DTO(); nhomNDDAL = new clsNhomNguoiDung_DAL(); nhomNDDTO = new clsNhomNguoiDung_DTO(); cmn = new clsCommon(); loadMasterData(); if (cboDienThi.Value != null) { //dotthiDTO.MaLoaiBang = cboLoaiBang.Value.ToString(); ndungDTO.MaDiemThi = cboDienThi.Value.ToString(); gvNguoiDung.DataSource = loadDataToUI(); gvNguoiDung.DataBind(); } }