public ThPhEpKimForm() { InitializeComponent(); epKimPres = new ThPhEpKimPresenter(this); LoadEpKim(); epKimPres.KhoiTaoBanDau(); //Load LoadEpKim(); cboEpKim.SelectedIndex = 0; //Envent txtSoLuong.TextChanged += new EventHandler(TextBoxes_TextChanged); lstNhuEpKim.SelectedIndexChanged += new EventHandler(TextBoxes_TextChanged); txtCao.Leave += new EventHandler(TextBoxes_Leave); txtRong.Leave += new EventHandler(TextBoxes_Leave); txtSoLuong.Leave += new EventHandler(TextBoxes_Leave); txtSoLuong.KeyPress += new KeyPressEventHandler(InputValidator); txtCao.KeyPress += new KeyPressEventHandler(InputValidator); txtRong.KeyPress += new KeyPressEventHandler(InputValidator); }
public ThPhEpKimForm(ThongTinBanDauThanhPham thongTinBanDau, MucThPhEpKim mucThPham) { InitializeComponent(); this.ThongTinHoTro = thongTinBanDau.ThongDiepCanThiet; this.TinhTrangForm = thongTinBanDau.TinhTrangForm; epKimPres = new ThPhEpKimPresenter(this, mucThPham); //Load LoadEpKim(); cboEpKim.SelectedIndex = -1; cboEpKim.SelectedIndex = 0; //Phải làm ở dây if (this.TinhTrangForm == FormStateS.Edit) { this.IdThanhPhamChon = mucThPham.IdThanhPhamChon; this.IdNhuEpKimChon = mucThPham.IdNhuEpKimChon; } //Envent txtSoLuong.TextChanged += new EventHandler(TextBoxes_TextChanged); lstNhuEpKim.SelectedIndexChanged += new EventHandler(TextBoxes_TextChanged); txtCao.TextChanged += new EventHandler(TextBoxes_TextChanged); txtRong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoLuong.Leave += new EventHandler(TextBoxes_Leave); txtCao.Leave += new EventHandler(TextBoxes_Leave); txtRong.Leave += new EventHandler(TextBoxes_Leave); txtSoLuong.KeyPress += new KeyPressEventHandler(InputValidator); txtCao.KeyPress += new KeyPressEventHandler(InputValidator); txtRong.KeyPress += new KeyPressEventHandler(InputValidator); }