private void searchListLop(String search) { if (lopSV == null) { lopSV = new LopSerivice(); } listLop.Clear(); listLop.AddRange(lopSV.getDsLop(search)); bindDataSource <lop>(listLop, gridLop); }
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"); } }
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"); } }
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"); } } }
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); }