private void SuaCuon() { var thongTinChoSach = new ThongTinBanDauChoBaiIn { IdHangKhachHang = this.IdHangKhachHang(), TinhTrangForm = FormStateS.Edit, YeuCauTinhGia = "" }; var giaSach = tinhGiaPres.DocCuonTheoID(this.IdGiaSachDiGiChon); var frm = new InSachForm(thongTinChoSach, giaSach); frm.MinimizeBox = false; frm.MaximizeBox = false; frm.StartPosition = FormStartPosition.CenterParent; frm.ShowDialog(); if (frm.DialogResult == System.Windows.Forms.DialogResult.OK) { XuLyNutOKTrenFormCuon(frm); //MessageBox.Show(this.BaiInS.Count().ToString()); LoadCuonLenListView(); } }
private void ThemCuon() { var thongTinChoSach = new ThongTinBanDauChoBaiIn { IdHangKhachHang = this.IdHangKhachHang(), TinhTrangForm = FormStateS.New, TieuDeForm = "[Mới] Tính giá Cuốn", YeuCauTinhGia = "" }; var quiCachSach = new Sach { ChieuCao = 10, ChieuRong = 5, GayDay = 0.5f, KieuDongCuon = KieuDongCuonS.KimKeoNep, SoTrangBia = 4, SoTrangRuot = 8 }; var giaSach = new GiaInSachDigi(quiCachSach, 10, this.IdHangKhachHang(), 0, "In cataloque"); var frm = new InSachForm(thongTinChoSach, giaSach); frm.MinimizeBox = false; frm.MaximizeBox = false; frm.StartPosition = FormStartPosition.CenterParent; frm.ShowDialog(); if (frm.DialogResult == System.Windows.Forms.DialogResult.OK) { XuLyNutOKTrenFormCuon(frm); //MessageBox.Show(this.BaiInS.Count().ToString()); LoadCuonLenListView(); } }
private void ThemBaiIn() { var thongTinChoBaiIn = new ThongTinBanDauChoBaiIn { IdHangKhachHang = this.IdHangKhachHang(), TinhTrangForm = FormStateS.New, YeuCauTinhGia = "", SanPhamRong = 21f, SanPhamCao = 29.7f }; var baiIn = new BaiIn("Bài in"); baiIn.TieuDe = "Tiêu đề"; baiIn.DienGiai = "Giấy, In, Thành phẩm, ..."; baiIn.SoLuong = 10; baiIn.DonVi = "tờ"; baiIn.IdHangKH = this.IdHangKhachHang(); var frm = new BaiInToForm(thongTinChoBaiIn, baiIn); frm.MinimizeBox = false; frm.MaximizeBox = false; frm.StartPosition = FormStartPosition.CenterParent; frm.ShowDialog(); if (frm.DialogResult == System.Windows.Forms.DialogResult.OK) { XuLyNutOKTrenFormBaiIn_Click(frm); //MessageBox.Show(this.BaiInS.Count().ToString()); LoadBaiInLenListView(); } }
private void ThemRuotSach() { var thongTinChoBaiIn = new ThongTinBanDauChoBaiIn { IdHangKhachHang = this.IdHangKhachHang, TinhTrangForm = FormStateS.New, TieuDeForm = "[Mới] Ruột Sách", YeuCauTinhGia = this.TieuDe + '\r' + '\n' + string.Format(" - Số cuốn: {0}" + '\r' + '\n', this.SoCuon) + " - Đóng cuốn: " + lbxDongCuon.SelectedItem.Text + '\r' + '\n' + string.Format(" - Ruột: {0} trg" + '\r' + '\n', this.SoTrangRuot), DanDoThem = " - Số lượng chỉ là tượng trưng" + '\r' + '\n' + " - Tờ ruột liền (đóng keo, kim) hay Tờ rời (đóng lò xo, nẹp vít)" + '\r' + '\n' + " - Từ đây nhập Số lượng chính xác" + '\r' + '\n' }; var baiIn = new BaiIn("Ruột sách"); baiIn.DienGiai = "Giấy, In, Thành phẩm, v.v."; //Xác định ruột đôi hay ruột đơn để thêm kích thước và số lượng cho phù hợp //Ruột đơn là 2 trang rời, ruột đôi là 2 trang liền var monDongCuon = inSachPres.DocMonDongCuonTheoID(); if (monDongCuon.RuotDon) { baiIn.SoLuong = inSachPres.TongSoTrangRuot() / 2; thongTinChoBaiIn.YeuCauTinhGia += string.Format(" - Ruột khổ: {0} x {1}cm" + '\r' + '\n', this.SachRong, this.SachCao); thongTinChoBaiIn.SanPhamRong = this.SachRong;//Bài in bìa } else { baiIn.SoLuong = baiIn.SoLuong = inSachPres.TongSoTrangRuot() / 4; thongTinChoBaiIn.YeuCauTinhGia += string.Format(" - Ruột khổ: {0} x {1}cm" + '\r' + '\n', this.SachRong * 2, this.SachCao); thongTinChoBaiIn.SanPhamRong = this.SachRong * 2;//Ruôt rộng gấp đôi } thongTinChoBaiIn.SanPhamCao = this.SachCao; baiIn.DonVi = "tờ"; baiIn.IdHangKH = this.IdHangKhachHang; var frm = new BaiInToForm(thongTinChoBaiIn, baiIn); frm.MinimizeBox = false; frm.MaximizeBox = false; frm.StartPosition = FormStartPosition.CenterParent; frm.ShowDialog(); if (frm.DialogResult == System.Windows.Forms.DialogResult.OK) { XuLyNutOKTrenFormBaiInRuot(frm); } }
private void ThemBiaSach() { var thongTinChoBaiIn = new ThongTinBanDauChoBaiIn { IdHangKhachHang = this.IdHangKhachHang, TinhTrangForm = FormStateS.New, TieuDeForm = "[Mới] Bìa sách", YeuCauTinhGia = this.TieuDe + '\r' + '\n' + " - Đóng cuốn: " + lbxDongCuon.SelectedItem.Text + '\r' + '\n' + string.Format(" - Số cuốn: {0}" + '\r' + '\n', this.SoCuon) + string.Format(" - Bìa: {0} trg" + '\r' + '\n', this.SoTrangBia), DanDoThem = " - Số lượng chỉ là tượng trưng" + '\r' + '\n' + " - Bìa tờ liền (đóng keo, kim) hay Bìa rời (đóng lò xo, nẹp vít)" + '\r' + '\n' + " - Từ đây nhập Số lượng chính xác" + '\r' + '\n' }; var baiIn = new BaiIn("Bìa sách"); baiIn.DienGiai = "Giấy, In, Thành phẩm, v.v."; ///Xác định bìa đơn hay bìa đôi để thêm kích thước và số lượng cho phù hợp ///bìa đơn là 2 trang rời, bìa đôi là 2 trang liền var monDongCuon = inSachPres.DocMonDongCuonTheoID(); if (monDongCuon.BiaDon) { baiIn.SoLuong = this.SoCuon * 2; //suy luật số lượng bìa thongTinChoBaiIn.YeuCauTinhGia += string.Format(" - Bìa khổ: {0} x {1}cm" + '\r' + '\n', this.SachRong, this.SachCao); thongTinChoBaiIn.SanPhamRong = this.SachRong; } else { baiIn.SoLuong = this.SoCuon; thongTinChoBaiIn.YeuCauTinhGia += string.Format(" - Bìa khổ: {0} x {1}cm" + '\r' + '\n', this.SachRong * 2 + this.GayDay, this.SachCao); thongTinChoBaiIn.SanPhamRong = this.SachRong * 2 + this.GayDay; } thongTinChoBaiIn.SanPhamCao = this.SachCao; baiIn.DonVi = "Tờ"; baiIn.IdHangKH = this.IdHangKhachHang; var frm = new BaiInToForm(thongTinChoBaiIn, baiIn); frm.MinimizeBox = false; frm.MaximizeBox = false; frm.StartPosition = FormStartPosition.CenterParent; frm.ShowDialog(); if (frm.DialogResult == System.Windows.Forms.DialogResult.OK) { XuLyNutOKTrenFormBaiInBia(frm); //MessageBox.Show(this.BaiInS.Count().ToString()); //LoadBaiInLenListView(); } }
public InSachForm(ThongTinBanDauChoBaiIn thongTinBanDau, GiaInSachDigi giaInSachDigi) { InitializeComponent(); //Theo thứ tự this.TinhTrangForm = thongTinBanDau.TinhTrangForm; this.IdHangKhachHang = thongTinBanDau.IdHangKhachHang; this.Text = thongTinBanDau.TieuDeForm; //Tiếp làm cái này inSachPres = new InSachDigiPresenter(this, giaInSachDigi); //Loa LoadMonDongCuon(); //Events txtTieuDe.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSachCao.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSachRong.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoCuon.TextChanged += new EventHandler(TextBoxes_TextChanged); txtGayDay.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoTrangBia.TextChanged += new EventHandler(TextBoxes_TextChanged); txtSoTrangRuot.TextChanged += new EventHandler(TextBoxes_TextChanged); rdbKhachDV.ToggleStateChanged += new Telerik.WinControls.UI.StateChangedEventHandler(RadioButtons_ToggleStateChanged); rdbKhachLe.ToggleStateChanged += new Telerik.WinControls.UI.StateChangedEventHandler(RadioButtons_ToggleStateChanged); txtSoTrangBia.Leave += new EventHandler(TextBoxes_Leave); txtSoTrangRuot.Leave += new EventHandler(TextBoxes_Leave); txtSachCao.KeyPress += new KeyPressEventHandler(InputValidator); txtGayDay.KeyPress += new KeyPressEventHandler(InputValidator); txtSachRong.KeyPress += new KeyPressEventHandler(InputValidator); txtSoCuon.KeyPress += new KeyPressEventHandler(InputValidator); txtSoTrangBia.KeyPress += new KeyPressEventHandler(InputValidator); txtSoTrangRuot.KeyPress += new KeyPressEventHandler(InputValidator); radWiz1.SelectedPageChanging += new Telerik.WinControls.UI.SelectedPageChangingEventHandler(Wizard_SelectedPageChanging); radWiz1.SelectedPageChanged += new Telerik.WinControls.UI.SelectedPageChangedEventHandler(Wizard_SelectedPageChanged); }