Beispiel #1
0
        public List <KQHT_ToChucThiInfo> GetList(KQHT_ToChucThiInfo pKQHT_ToChucThiInfo)
        {
            List <KQHT_ToChucThiInfo> oKQHT_ToChucThiInfoList = new List <KQHT_ToChucThiInfo>();
            DataTable dtb = Get(pKQHT_ToChucThiInfo);

            if (dtb != null)
            {
                for (int i = 0; i < dtb.Rows.Count; i++)
                {
                    oKQHT_ToChucThiInfo = new KQHT_ToChucThiInfo();

                    oKQHT_ToChucThiInfo.KQHT_ToChucThiID = int.Parse(dtb.Rows[i]["KQHT_ToChucThiID"].ToString());
                    oKQHT_ToChucThiInfo.IDDM_MonHoc      = int.Parse(dtb.Rows[i]["IDDM_MonHoc"].ToString());
                    oKQHT_ToChucThiInfo.IDDM_NamHoc      = int.Parse(dtb.Rows[i]["IDDM_NamHoc"].ToString());
                    oKQHT_ToChucThiInfo.HocKy            = int.Parse(dtb.Rows[i]["HocKy"].ToString());
                    oKQHT_ToChucThiInfo.LanThi           = int.Parse(dtb.Rows[i]["LanThi"].ToString());
                    oKQHT_ToChucThiInfo.DotThi           = int.Parse(dtb.Rows[i]["DotThi"].ToString());
                    oKQHT_ToChucThiInfo.NgayThi          = DateTime.Parse(dtb.Rows[i]["NgayThi"].ToString());
                    oKQHT_ToChucThiInfo.CaThi            = int.Parse(dtb.Rows[i]["CaThi"].ToString());
                    oKQHT_ToChucThiInfo.NhomTiet         = int.Parse(dtb.Rows[i]["NhomTiet"].ToString());
                    oKQHT_ToChucThiInfo.IDHT_User        = int.Parse(dtb.Rows[i]["IDHT_User"].ToString());
                    oKQHT_ToChucThiInfo.NgayTao          = DateTime.Parse(dtb.Rows[i]["NgayTao"].ToString());

                    oKQHT_ToChucThiInfoList.Add(oKQHT_ToChucThiInfo);
                }
            }
            return(oKQHT_ToChucThiInfoList);
        }
Beispiel #2
0
        public void Delete(KQHT_ToChucThiInfo pKQHT_ToChucThiInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@KQHT_ToChucThiID", SqlDbType.Int, pKQHT_ToChucThiInfo.KQHT_ToChucThiID));

            RunProcedure("sp_KQHT_ToChucThi_Delete", colParam);
        }
Beispiel #3
0
        public DataTable Get(KQHT_ToChucThiInfo pKQHT_ToChucThiInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@KQHT_ToChucThiID", SqlDbType.Int, pKQHT_ToChucThiInfo.KQHT_ToChucThiID));

            return(RunProcedureGet("sp_KQHT_ToChucThi_Get", colParam));
        }
Beispiel #4
0
        public int Add(KQHT_ToChucThiInfo pKQHT_ToChucThiInfo)
        {
            int ID = 0;

            ID            = oDKQHT_ToChucThi.Add(pKQHT_ToChucThiInfo);
            mErrorMessage = oDKQHT_ToChucThi.ErrorMessages;
            mErrorNumber  = oDKQHT_ToChucThi.ErrorNumber;
            return(ID);
        }
Beispiel #5
0
 public void ToInfo(ref KQHT_ToChucThiInfo pKQHT_ToChucThiInfo, DataRow dr)
 {
     pKQHT_ToChucThiInfo.KQHT_ToChucThiID = int.Parse(dr[pKQHT_ToChucThiInfo.strKQHT_ToChucThiID].ToString());
     pKQHT_ToChucThiInfo.IDDM_MonHoc      = int.Parse(dr[pKQHT_ToChucThiInfo.strIDDM_MonHoc].ToString());
     pKQHT_ToChucThiInfo.IDDM_NamHoc      = int.Parse(dr[pKQHT_ToChucThiInfo.strIDDM_NamHoc].ToString());
     pKQHT_ToChucThiInfo.HocKy            = int.Parse(dr[pKQHT_ToChucThiInfo.strHocKy].ToString());
     pKQHT_ToChucThiInfo.LanThi           = int.Parse(dr[pKQHT_ToChucThiInfo.strLanThi].ToString());
     pKQHT_ToChucThiInfo.DotThi           = int.Parse(dr[pKQHT_ToChucThiInfo.strDotThi].ToString());
     pKQHT_ToChucThiInfo.NgayThi          = DateTime.Parse(dr[pKQHT_ToChucThiInfo.strNgayThi].ToString());
     pKQHT_ToChucThiInfo.CaThi            = int.Parse(dr[pKQHT_ToChucThiInfo.strCaThi].ToString());
     pKQHT_ToChucThiInfo.NhomTiet         = int.Parse(dr[pKQHT_ToChucThiInfo.strNhomTiet].ToString());
     pKQHT_ToChucThiInfo.IDHT_User        = int.Parse(dr[pKQHT_ToChucThiInfo.strIDHT_User].ToString());
     pKQHT_ToChucThiInfo.NgayTao          = DateTime.Parse(dr[pKQHT_ToChucThiInfo.strNgayTao].ToString());
 }
Beispiel #6
0
 public void ToDataRow(KQHT_ToChucThiInfo pKQHT_ToChucThiInfo, ref DataRow dr)
 {
     dr[pKQHT_ToChucThiInfo.strKQHT_ToChucThiID] = pKQHT_ToChucThiInfo.KQHT_ToChucThiID;
     dr[pKQHT_ToChucThiInfo.strIDDM_MonHoc]      = pKQHT_ToChucThiInfo.IDDM_MonHoc;
     dr[pKQHT_ToChucThiInfo.strIDDM_NamHoc]      = pKQHT_ToChucThiInfo.IDDM_NamHoc;
     dr[pKQHT_ToChucThiInfo.strHocKy]            = pKQHT_ToChucThiInfo.HocKy;
     dr[pKQHT_ToChucThiInfo.strLanThi]           = pKQHT_ToChucThiInfo.LanThi;
     dr[pKQHT_ToChucThiInfo.strDotThi]           = pKQHT_ToChucThiInfo.DotThi;
     dr[pKQHT_ToChucThiInfo.strNgayThi]          = pKQHT_ToChucThiInfo.NgayThi;
     dr[pKQHT_ToChucThiInfo.strCaThi]            = pKQHT_ToChucThiInfo.CaThi;
     dr[pKQHT_ToChucThiInfo.strNhomTiet]         = pKQHT_ToChucThiInfo.NhomTiet;
     dr[pKQHT_ToChucThiInfo.strIDHT_User]        = pKQHT_ToChucThiInfo.IDHT_User;
     dr[pKQHT_ToChucThiInfo.strNgayTao]          = pKQHT_ToChucThiInfo.NgayTao;
 }
        public frmToChucThi(int mIDKQHT_ToChucThi, int mIDDM_MonHoc, string TenMonHoc)
        {
            InitializeComponent();
            IDKQHT_ToChucThi        = mIDKQHT_ToChucThi;
            IDDM_MonHoc             = mIDDM_MonHoc;
            txtTenMonHoc.Text       = TenMonHoc;
            oBDM_Lop                = new cBDM_Lop();
            oBDM_MonHoc             = new cBDM_MonHoc();
            oBKQHT_ToChucThi        = new cBKQHT_ToChucThi();
            pKQHT_ToChucThiInfo     = new KQHT_ToChucThiInfo();
            oBKQHT_DanhSachDuThi    = new cBKQHT_DanhSachDuThi();
            pKQHT_DanhSachDuThiInfo = new KQHT_DanhSachDuThiInfo();
            DataTable dt = (new cBDM_PhongHoc()).GetAll();

            repositoryItemLookUpEditPhongThi.DataSource = dt;
            dtpNgayThi.EditValue = DateTime.Today;
        }
Beispiel #8
0
        public void Update(KQHT_ToChucThiInfo pKQHT_ToChucThiInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@IDDM_MonHoc", SqlDbType.Int, pKQHT_ToChucThiInfo.IDDM_MonHoc));
            colParam.Add(CreateParam("@IDDM_NamHoc", SqlDbType.Int, pKQHT_ToChucThiInfo.IDDM_NamHoc));
            colParam.Add(CreateParam("@HocKy", SqlDbType.Int, pKQHT_ToChucThiInfo.HocKy));
            colParam.Add(CreateParam("@LanThi", SqlDbType.Int, pKQHT_ToChucThiInfo.LanThi));
            colParam.Add(CreateParam("@DotThi", SqlDbType.Int, pKQHT_ToChucThiInfo.DotThi));
            colParam.Add(CreateParam("@NgayThi", SqlDbType.DateTime, pKQHT_ToChucThiInfo.NgayThi));
            colParam.Add(CreateParam("@CaThi", SqlDbType.Int, pKQHT_ToChucThiInfo.CaThi));
            colParam.Add(CreateParam("@NhomTiet", SqlDbType.Int, pKQHT_ToChucThiInfo.NhomTiet));
            colParam.Add(CreateParam("@IDHT_User", SqlDbType.Int, pKQHT_ToChucThiInfo.IDHT_User));
            colParam.Add(CreateParam("@DongTui", SqlDbType.Bit, pKQHT_ToChucThiInfo.DongTui));
            colParam.Add(CreateParam("@TotNghiep", SqlDbType.Bit, pKQHT_ToChucThiInfo.TotNghiep));
            colParam.Add(CreateParam("@KQHT_ToChucThiID", SqlDbType.Int, pKQHT_ToChucThiInfo.KQHT_ToChucThiID));

            RunProcedure("sp_KQHT_ToChucThi_Update", colParam);
        }
Beispiel #9
0
        public int Add(KQHT_ToChucThiInfo pKQHT_ToChucThiInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@IDDM_MonHoc", SqlDbType.Int, pKQHT_ToChucThiInfo.IDDM_MonHoc));
            colParam.Add(CreateParam("@IDDM_NamHoc", SqlDbType.Int, pKQHT_ToChucThiInfo.IDDM_NamHoc));
            colParam.Add(CreateParam("@HocKy", SqlDbType.Int, pKQHT_ToChucThiInfo.HocKy));
            colParam.Add(CreateParam("@LanThi", SqlDbType.Int, pKQHT_ToChucThiInfo.LanThi));
            colParam.Add(CreateParam("@DotThi", SqlDbType.Int, pKQHT_ToChucThiInfo.DotThi));
            colParam.Add(CreateParam("@NgayThi", SqlDbType.DateTime, pKQHT_ToChucThiInfo.NgayThi));
            colParam.Add(CreateParam("@CaThi", SqlDbType.Int, pKQHT_ToChucThiInfo.CaThi));
            colParam.Add(CreateParam("@NhomTiet", SqlDbType.Int, pKQHT_ToChucThiInfo.NhomTiet));
            colParam.Add(CreateParam("@IDHT_User", SqlDbType.Int, pKQHT_ToChucThiInfo.IDHT_User));
            colParam.Add(CreateParam("@DongTui", SqlDbType.Bit, pKQHT_ToChucThiInfo.DongTui));
            colParam.Add(CreateParam("@TotNghiep", SqlDbType.Bit, pKQHT_ToChucThiInfo.TotNghiep));
            colParam.Add(CreateParamOut("@ID", SqlDbType.Int));

            return((int)RunProcedureOut("sp_KQHT_ToChucThi_Add", colParam));
        }
        public frmToChucThi_TotNghiep(int mIDKQHT_ToChucThi, int mIDDM_MonHoc, DataTable dtMonHoc)
        {
            InitializeComponent();
            IDKQHT_ToChucThi = mIDKQHT_ToChucThi;
            cmbMonThiTotNghiep.Properties.DataSource = dtMonHoc;
            cmbMonThiTotNghiep.EditValue             = mIDDM_MonHoc;
            cmbSapXepDanhSach.Properties.DataSource  = bLoadSapXep();

            oBDM_Lop                = new cBDM_Lop();
            oBDM_MonHoc             = new cBDM_MonHoc();
            oBKQHT_ToChucThi        = new cBKQHT_ToChucThi();
            pKQHT_ToChucThiInfo     = new KQHT_ToChucThiInfo();
            oBKQHT_DanhSachDuThi    = new cBKQHT_DanhSachDuThi();
            pKQHT_DanhSachDuThiInfo = new KQHT_DanhSachDuThiInfo();
            DataTable dt = (new cBDM_PhongHoc()).GetAll();

            repositoryItemLookUpEditPhongThi.DataSource = dt;
            dtpNgayThi.EditValue = DateTime.Today;
        }
Beispiel #11
0
 private void barbtnXoa_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (grvDotThi.RowCount > 0)
     {
         if (bool.Parse(grvDotThi.GetDataRow(grvDotThi.FocusedRowHandle)["DongTui"].ToString()))
         {
             ThongBao("Đợt thi của môn này đã đóng túi, bạn không thể xóa.");
             return;
         }
         else
         {
             if (ThongBaoChon("Bạn có chắc chắn muốn xóa đợt thi này không ?") == DialogResult.Yes)
             {
                 KQHT_ToChucThiInfo pKQHT_ToChucThiInfo = new KQHT_ToChucThiInfo();
                 pKQHT_ToChucThiInfo.KQHT_ToChucThiID = KQHT_ToChucThiID;
                 oBKQHT_ToChucThi.Delete(pKQHT_ToChucThiInfo);
                 grvDotThi.DeleteSelectedRows();
             }
         }
     }
 }
Beispiel #12
0
 public void Delete(KQHT_ToChucThiInfo pKQHT_ToChucThiInfo)
 {
     oDKQHT_ToChucThi.Delete(pKQHT_ToChucThiInfo);
     mErrorMessage = oDKQHT_ToChucThi.ErrorMessages;
     mErrorNumber  = oDKQHT_ToChucThi.ErrorNumber;
 }
Beispiel #13
0
 public DataTable Get(KQHT_ToChucThiInfo pKQHT_ToChucThiInfo)
 {
     return(oDKQHT_ToChucThi.Get(pKQHT_ToChucThiInfo));
 }