public GiayForm(int tinhTrangForm, string nhaCC, int idDanhMucGiay, int idGiay = 0) { InitializeComponent(); giayPres = new GiayPresenter(this); this.TinhTrangForm = tinhTrangForm; this.MaNhaCungCap = nhaCC; txtPaperName.TextChanged += new EventHandler(textBox_TextChanged); txtLongDim.TextChanged += new EventHandler(textBox_TextChanged); txtShortDim.TextChanged += new EventHandler(textBox_TextChanged); txtLongDim.TextChanged += new EventHandler(textBox_TextChanged); txtSubstance.TextChanged += new EventHandler(textBox_TextChanged); txtPaperCode.TextChanged += new EventHandler(textBox_TextChanged); txtUnitPrice.TextChanged += new EventHandler(textBox_TextChanged); txtThuTu.TextChanged += new EventHandler(textBox_TextChanged); txtShortDim.Leave += new EventHandler(textBox_Leave); txtSubstance.KeyPress += new KeyPressEventHandler(InputValidator); txtUnitPrice.KeyPress += new KeyPressEventHandler(InputValidator); //chỉ được nhập số chẵn txtThuTu.KeyPress += new KeyPressEventHandler(InputValidator); //chỉ được nhập số chẵn txtShortDim.KeyPress += new KeyPressEventHandler(InputValidator); txtLongDim.KeyPress += new KeyPressEventHandler(InputValidator); IsDataChanged = false; }
public GiayForm(int tinhTrangForm, string tenNhaCC, int idDanhMucGiay, int idGiay = 0) { InitializeComponent(); giayPres = new GiayPresenter(this); this.IdGiay = idGiay; this.TinhTrangForm = tinhTrangForm; this.TenNhaCungCap = tenNhaCC; this.IdDanhMucGiay = idDanhMucGiay; LoadDanhMucGiay(); //Chọn dm giấy theo IdDanhMucGiay đc cung cấp cboDanhMucGiay.Text = giayPres.TenDanhMucGiay(this.IdDanhMucGiay); //- giayPres.TrinhBayGiay(); cboDanhMucGiay.TextChanged += new EventHandler(textBox_TextChanged); txtTenGiay.TextChanged += new EventHandler(textBox_TextChanged); txtDienGiai.TextChanged += new EventHandler(textBox_TextChanged); txtKhoGiay.TextChanged += new EventHandler(textBox_TextChanged); txtChieuDai.TextChanged += new EventHandler(textBox_TextChanged); txtChieuNgan.TextChanged += new EventHandler(textBox_TextChanged); txtChieuDai.TextChanged += new EventHandler(textBox_TextChanged); txtDinhLuong.TextChanged += new EventHandler(textBox_TextChanged); txtMaGiayNCC.TextChanged += new EventHandler(textBox_TextChanged); txtGiaMua.TextChanged += new EventHandler(textBox_TextChanged); txtThuTu.TextChanged += new EventHandler(textBox_TextChanged); chkTonKho.CheckedChanged += new EventHandler(textBox_TextChanged); chkKhongCon.CheckedChanged += new EventHandler(textBox_TextChanged); txtTenGiayMoRong.TextChanged += new EventHandler(textBox_TextChanged); txtChieuNgan.Leave += new EventHandler(textBox_Leave); txtDinhLuong.KeyPress += new KeyPressEventHandler(InputValidator); txtGiaMua.KeyPress += new KeyPressEventHandler(InputValidator); //chỉ được nhập số chẵn txtThuTu.KeyPress += new KeyPressEventHandler(InputValidator); //chỉ được nhập số chẵn txtChieuNgan.KeyPress += new KeyPressEventHandler(InputValidator); txtChieuDai.KeyPress += new KeyPressEventHandler(InputValidator); IsDataChanged = false; }
public GiayForm() { InitializeComponent(); giayPresenter = new GiayPresenter(this); txtPaperName.TextChanged += new EventHandler(textBox_TextChanged); txtLongDim.TextChanged += new EventHandler(textBox_TextChanged); txtShortDim.TextChanged += new EventHandler(textBox_TextChanged); txtLongDim.TextChanged += new EventHandler(textBox_TextChanged); txtSubstance.TextChanged += new EventHandler(textBox_TextChanged); txtPaperCode.TextChanged += new EventHandler(textBox_TextChanged); txtUnitPrice.TextChanged += new EventHandler(textBox_TextChanged); txtProfitMargin.TextChanged += new EventHandler(textBox_TextChanged); lblCateName.TextChanged += new EventHandler(textBox_TextChanged); txtShortDim.Leave += new EventHandler(textBox_Leave); txtSubstance.KeyPress += new KeyPressEventHandler(InputValidator); txtUnitPrice.KeyPress += new KeyPressEventHandler(InputValidator); //chỉ được nhập số chẵn txtProfitMargin.KeyPress += new KeyPressEventHandler(InputValidator); //chỉ được nhập số chẵn txtShortDim.KeyPress += new KeyPressEventHandler(InputValidator); txtLongDim.KeyPress += new KeyPressEventHandler(InputValidator); IsDataChanged = false; }