Example #1
0
        private void btnDel_Click(object sender, EventArgs e)
        {
            BLL_QLSV bll = new BLL_QLSV();
            DataGridViewSelectedRowCollection data = dtgSV.SelectedRows;

            if (data.Count == 1)
            {
                string MSSV = data[0].Cells["MSSV"].Value.ToString();
                SV     s    = bll.GetSVbyMSSV(MSSV);
                bll.DELSVBLL(s);
            }
            Show(0, txbSearch.Text);
        }
Example #2
0
        public void SetGUI(string ms)
        {
            BLL_QLSV bll = new BLL_QLSV();

            if (bll.GetSVbyMSSV(ms) != null)
            {
                // Binding
                SV s = bll.GetSVbyMSSV(ms);
                txbMSSV.Text     = s.MSSV;
                txbName.Text     = s.NameSV;
                dtNgaySinh.Value = s.NgaySinh;
                if (s.Gender == true)
                {
                    rbMale.Checked = true;
                }
                else
                {
                    rbFemale.Checked = true;
                }
                cbbLopSH.Text = ((CBBItem)cbbLopSH.Items[s.ID_Lop - 1]).Text;
            }
        }