private void ThemDanhThiep() { var thongTinBanDau = new ThongTinBanDauChoDanhThiep { IdHangKhachHang = this.IdHangKhachHang(), TinhTrangForm = FormStateS.New }; BaiInDanhThiep baiInDThiep = new BaiInDanhThiep(0, "", "9 x 5.5cm", 5, 2); baiInDThiep.TieuDe = "Danh thiếp"; var frm = new GiaInDanhThiepForm(thongTinBanDau, baiInDThiep); frm.Text = "Tính giá danh thiếp"; frm.MinimizeBox = false; frm.MaximizeBox = false; frm.StartPosition = FormStartPosition.CenterParent; frm.ShowDialog(); if (frm.DialogResult == System.Windows.Forms.DialogResult.OK) { XuLyNutOKTrenFormDanhThiep(frm); //MessageBox.Show(this.BaiInS.Count().ToString()); LoadDanhThiepListView(); } }
private void ThemTheNhua() { var thongTinBanDau = new ThongTinBanDauChoDanhThiep { IdHangKhachHang = this.IdHangKhachHang(), TinhTrangForm = FormStateS.New }; var baiInTheNhua = new BaiInTheNhua(0, "", "", 10, 2); baiInTheNhua.TieuDe = "In thẻ VIP"; baiInTheNhua.KichThuoc = "8 x 5.5cm"; baiInTheNhua.SoLuongThe = 10; var frm = new GiaInTheNhuaForm(thongTinBanDau, baiInTheNhua); frm.Text = "Tính giá Thẻ nhựa"; frm.MinimizeBox = false; frm.MaximizeBox = false; frm.StartPosition = FormStartPosition.CenterParent; frm.ShowDialog(); if (frm.DialogResult == System.Windows.Forms.DialogResult.OK) { XuLyNutOKTrenFormTheNhua(frm); //MessageBox.Show(this.BaiInS.Count().ToString()); LoadDanhThiepListView(); } }
public GiaInDanhThiepForm(ThongTinBanDauChoDanhThiep thongTinBanDau, BaiInDanhThiep baiInDThiep, int idBaiInDanhthiep = 0) { InitializeComponent(); this.IdHangKH = thongTinBanDau.IdHangKhachHang; this.TinhTrangForm = thongTinBanDau.TinhTrangForm; this.ID = idBaiInDanhthiep; giaDanhThiepPres = new GiaDanhThiepPresenter(this, baiInDThiep); txtHangKhachHang.Text = thongTinBanDau.TenHangKhachHang; LoadDanhSachBangGia(); cboBangGia.SelectedIndex = -1; cboBangGia.SelectedIndex = 0; //envents txtSoLuong.KeyPress += new KeyPressEventHandler(InputValidator); txtSoLuong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtTieuDe.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoLuong.Leave += new EventHandler(TextBoxes_Leave); txtTieuDe.Leave += new EventHandler(TextBoxes_Leave); lblTienIn.TextChanged += new EventHandler(TextBoxes_TextChanged); lblTienGiay.TextChanged += new EventHandler(TextBoxes_TextChanged); lblThanhTien.TextChanged += new EventHandler(TextBoxes_TextChanged); }