protected void Page_Load(object sender, EventArgs e)
    {
        if (Convert.ToString(Session["TenDangNhap"]) == "")
        {
            Response.Redirect("~/dangnhap.aspx");
        }
        pcctDAL = new clsPhanCongCoithi_DAL();
        pcctDTO = new clsPhanCongCoiThi_DTO();

        pthiDAL = new clsPhongThi_DAL();
        pthiDTO = new clsPhongThi_DTO();

        cathiDAL = new clsCaThi_DAL();
        cathiDTO = new clsCaThi_DTO();

        //thisinhDAL = new clsThiSinh_DAL();
        //thisinhDTO = new clsThiSinh_DTO();

        cmn = new clsCommon();
        if (!IsPostBack || !IsCallback)
        {
        }
        if (!Page.IsPostBack)
        {
        }
        loadMasterData();
        gvPhanCongCT.DataSource = loadDataToUI();
        gvPhanCongCT.DataBind();
    }
 public int Delete(clsPhanCongCoiThi_DTO pcctDTO)
 {
     try
     {
         ListDictionary _list = new ListDictionary();
         _list.Add("STT", pcctDTO.STT);
         int iReturn = obj.ExcSql("Delete_Phan_Cong_Coi_Thi", _list, CommandType.StoredProcedure);
         return iReturn;
     }
     catch (Exception)
     {
         //return ex.Message;
         return -1111;
     }
 }
 public int Delete(clsPhanCongCoiThi_DTO pcctDTO)
 {
     try
     {
         ListDictionary _list = new ListDictionary();
         _list.Add("STT", pcctDTO.STT);
         int iReturn = obj.ExcSql("Delete_Phan_Cong_Coi_Thi", _list, CommandType.StoredProcedure);
         return(iReturn);
     }
     catch (Exception)
     {
         //return ex.Message;
         return(-1111);
     }
 }
 public DataTable getPCCT(clsPhanCongCoiThi_DTO pcctDTO)
 {
     ListDictionary _list = new ListDictionary();
     _list.Add("STT", pcctDTO.STT);
     _list.Add("TenDangNhap", pcctDTO.TenDangNhap);
     _list.Add("MaCaThi", pcctDTO.MaCaThi);
     _list.Add("MaPhong", pcctDTO.MaPhong);
     DataTable dt = new DataTable();
     try
     {
         dt = obj.GetDataTable("Select_Phan_Cong_Coi_Thi", _list, CommandType.StoredProcedure);
     }
     catch
     {
         dt = null;
     }
     return dt;
 }
 public int InsertUpdate(clsPhanCongCoiThi_DTO pcctDTO)
 {
     try
     {
         ListDictionary _list = new ListDictionary();
         _list.Add("old_id", pcctDTO.OldID);
         _list.Add("STT", pcctDTO.STT);
         _list.Add("TenDangNhap", pcctDTO.TenDangNhap);
         _list.Add("MaCaThi", pcctDTO.MaCaThi);
         _list.Add("MaPhong", pcctDTO.MaPhong);
         int iReturn = obj.ExcSql("Insert_Update_Phan_Cong_Coi_Thi", _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(clsPhanCongCoiThi_DTO pcctDTO)
 {
     try
     {
         ListDictionary _list = new ListDictionary();
         _list.Add("old_id", pcctDTO.OldID);
         _list.Add("STT", pcctDTO.STT);
         _list.Add("TenDangNhap", pcctDTO.TenDangNhap);
         _list.Add("MaCaThi", pcctDTO.MaCaThi);
         _list.Add("MaPhong", pcctDTO.MaPhong);
         int iReturn = obj.ExcSql("Insert_Update_Phan_Cong_Coi_Thi", _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 getPCCT(clsPhanCongCoiThi_DTO pcctDTO)
    {
        ListDictionary _list = new ListDictionary();

        _list.Add("STT", pcctDTO.STT);
        _list.Add("TenDangNhap", pcctDTO.TenDangNhap);
        _list.Add("MaCaThi", pcctDTO.MaCaThi);
        _list.Add("MaPhong", pcctDTO.MaPhong);
        DataTable dt = new DataTable();

        try
        {
            dt = obj.GetDataTable("Select_Phan_Cong_Coi_Thi", _list, CommandType.StoredProcedure);
        }
        catch
        {
            dt = null;
        }
        return(dt);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Convert.ToString(Session["TenDangNhap"]) == "")
            Response.Redirect("~/dangnhap.aspx");
        pcctDAL = new clsPhanCongCoithi_DAL();
        pcctDTO = new clsPhanCongCoiThi_DTO();

        pthiDAL = new clsPhongThi_DAL();
        pthiDTO = new clsPhongThi_DTO();

        cathiDAL = new clsCaThi_DAL();
        cathiDTO = new clsCaThi_DTO();

        //thisinhDAL = new clsThiSinh_DAL();
        //thisinhDTO = new clsThiSinh_DTO();

        cmn = new clsCommon();
        if (!IsPostBack || !IsCallback)
        {

        }
        if (!Page.IsPostBack)
        {

        }
        loadMasterData();
        gvPhanCongCT.DataSource = loadDataToUI();
        gvPhanCongCT.DataBind();
    }