// GET: Admin/KetQua
        public ActionResult Index(int page = 1, int pageSize = 10)
        {
            KetQuaData qk    = new KetQuaData();
            var        model = qk.ListKetQua(page, pageSize);

            return(View(model));
        }
Exemple #2
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public string LayMaCuoi()
 {
     if (this.Data == null)
     {
         this.Data = new KetQuaData();
     }
     return(Convert.ToString(this.Data.LayMaCuoi()));
 }
Exemple #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="cmb"></param>
 public void HienThiCombobox(ComboBox cmb)
 {
     if (this.Data == null)
     {
         this.Data = new KetQuaData();
     }
     cmb.DataSource    = this.Data.LayDS();
     cmb.DisplayMember = "TenKetQua";
     cmb.ValueMember   = "MaKetQua";
 }
Exemple #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="col"></param>
 public void HienThiDataGridComboBoxColumn(DataGridViewComboBoxColumn col)
 {
     if (this.Data == null)
     {
         this.Data = new KetQuaData();
     }
     col.DataSource       = this.Data.LayDS();
     col.DisplayMember    = "TenKetQua";
     col.ValueMember      = "MaKetQua";
     col.DataPropertyName = "MaKetQua";
 }
Exemple #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dg"></param>
        /// <param name="bn"></param>
        public void HienThiDS(DataGridView dgvDS, BindingNavigator bnDS)
        {
            if (this.Data == null)
            {
                this.Data = new KetQuaData();
            }

            BindingSource bs = new BindingSource();

            bs.DataSource      = this.Data.LayDS();
            bnDS.BindingSource = bs;
            dgvDS.DataSource   = bs;
        }
Exemple #6
0
 public ActionResult Delete(int id, FormCollection collection)
 {
     try
     {
         // TODO: Add delete logic here
         KetQuaData kq = new KetQuaData();
         kq.Delete(id);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Exemple #7
0
 public KetQuaController()
 {
     this.Data = new KetQuaData();
 }