예제 #1
0
 private void searchListLop(String search)
 {
     if (lopSV == null)
     {
         lopSV = new LopSerivice();
     }
     listLop.Clear();
     listLop.AddRange(lopSV.getDsLop(search));
     bindDataSource <lop>(listLop, gridLop);
 }
예제 #2
0
        private void lollipopButton2_Click(object sender, EventArgs e)
        {
            bool result = new LopSerivice().suaLop(getDataFromView());

            if (result)
            {
                this.Hide();
                //refresh list
                response.onResponse(Constants.CODE_LOP);
            }
            else
            {
                MessageBox.Show("Khong the sua lop");
            }
        }
예제 #3
0
        private void lollipopButton1_Click(object sender, EventArgs e)
        {
            lop  lop    = getDataFromView();
            bool result = new LopSerivice().themLop(lop);

            if (result)
            {
                this.Hide();
                //refresh list
                response.onResponse(Constants.CODE_LOP);
            }
            else
            {
                MessageBox.Show("Khong the them vao danh sach");
            }
        }
예제 #4
0
        private void lollipopButton3_Click(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("Bạn chắc chắn muốn xóa?", "Xóa ", MessageBoxButtons.YesNoCancel,
                                              MessageBoxIcon.Question);

            if (dr == DialogResult.Yes)
            {
                bool result = new LopSerivice().xoaLop(getDataFromView());
                if (result)
                {
                    this.Hide();
                    //refresh list
                    response.onResponse(Constants.CODE_LOP);
                }
                else
                {
                    MessageBox.Show("Khong the xoa lop");
                }
            }
        }
예제 #5
0
        private void updateListLop()
        {
            if (lopSV == null)
            {
                lopSV = new LopSerivice();
            }
            listLop.Clear();
            listLop.AddRange(lopSV.getDsLop());
            List <String> s = new List <string>();

            foreach (lop l in listLop)
            {
                s.Add(l.malop);
                s.Add(l.makhoa);
                s.Add(l.tenlop);
            }

            bindAutoCompleteToTextbox(s.ToArray());
            bindDataSource <lop>(listLop, gridLop);
        }