public BangGiaForm(LoaiBangGiaS loaiBangGia, FormStateS tinhTrangForm, int idBangGia = 0) { InitializeComponent(); //NhapMotSoCoban this.Id = idBangGia; this.LoaiBangGia = loaiBangGia.ToString(); this.TinhTrangForm = tinhTrangForm; // bangGiaPres = new BangGiaPresenter(this); //MessageBox.Show(loaiBangGia.ToString()); //Event txtTen.TextChanged += new EventHandler(TextBoxes_TextChanged); txtDienGiai.TextChanged += new EventHandler(TextBoxes_TextChanged); txtThuTu.TextChanged += new EventHandler(TextBoxes_TextChanged); txtDaySoLuong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtMucGia.TextChanged += new EventHandler(TextBoxes_TextChanged); chkKhongSuDung.CheckStateChanged += new EventHandler(TextBoxes_TextChanged); txtThuTu.KeyPress += new KeyPressEventHandler(InputValidator); }
public KhoSanPhamSForm(FormStateS formState) { InitializeComponent(); khoSanPhamPres = new KhoSanPhamPresenter(this); cmnu_AddNew.Click += new EventHandler(MenuItems_Click); cmnu_Edit.Click += new EventHandler(MenuItems_Click); cmnu_Delete.Click += new EventHandler(MenuItems_Click); this.TinhTrangForm = formState; }
public BangGiaGiayForm(FormStateS tinhTrangForm, int idHangKh = 0, string thongTinGiayChonCu = "") { InitializeComponent(); this.TinhTrangForm = tinhTrangForm; bangGiaGiayPres = new BangGiaGiayPresenter(this); LoadHangKhachHang(); this.IdHangKHChon = idHangKh;//Bẩy thử LoadNhaCungCapGiay(); /*if (!string.IsNullOrEmpty(thongTinGiayChonCu)) * { * txtThongTinGiayChonCu.Text = thongTinGiayChonCu; * }*/ }
private ThongTinBanDauThanhPham thongTinBanDauChoThPh(int idHangKH, LoaiThanhPhamS loaiThPham, FormStateS tinhTrangForm, string tieuDeForm, string donViTinh) { var thongTinBanDau = new ThongTinBanDauThanhPham { IdBaiIn = 1, IdHangKhachHang = idHangKH, LoaiThanhPham = loaiThPham, DonViTinh = donViTinh, SoLuongSanPham = 50, TieuDeForm = tieuDeForm, SoLuongToChay = 1, TinhTrangForm = tinhTrangForm, ThongDiepCanThiet = "Tính thử:" + '\n' + '\r', }; return(thongTinBanDau); }
private ThongTinBanDauChoGiayInDanhThiep thongTinBanDauChoGiayIn(FormStateS tinhTrangForm) { var thongTinBanDau = new ThongTinBanDauChoGiayInDanhThiep(); thongTinBanDau.TinhTrangForm = tinhTrangForm; thongTinBanDau.KichThuocSanPham = new KichThuocPhang { Rong = 9 + 0.4f, Dai = 5.5f + 0.4f }; thongTinBanDau.SoLuongSanPham = this.SoLuong; //Số hộp thongTinBanDau.SoDanhThiepTrenHop = giaDanhThiepPres.SoDanhThiepTrenMoiHop(); //lấy từ đatabase thongTinBanDau.IdHangKhachHang = this.IdHangKH; thongTinBanDau.IdToIn_MayInChon = 1; //Đưa tượng trưng thongTinBanDau.PhuongPhapIn = PhuongPhapInS.Toner; thongTinBanDau.ThongTinCanThiet = string.Format("Danh thiếp {0} " + '\r' + '\n', this.KichThuoc) + string.Format("Số hộp: {0})" + '\r' + '\n', this.SoLuong) + "Cần cẩn thận chọn khổ giấy"; return(thongTinBanDau); }