Example #1
0
        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();
            }
        }
Example #2
0
 public InSachDigiPresenter(IViewInSachDigi view, GiaInSachDigi giaInSach)
 {
     View             = view;
     this.GiaSachDigi = giaInSach;
     //
     View.ID           = this.GiaSachDigi.ID;
     View.TieuDe       = this.GiaSachDigi.TieuDe;
     View.SachRong     = this.GiaSachDigi.QuiCachSach.ChieuRong;
     View.SachCao      = this.GiaSachDigi.QuiCachSach.ChieuCao;
     View.GayDay       = this.GiaSachDigi.QuiCachSach.GayDay;
     View.KieuDongCuon = this.GiaSachDigi.QuiCachSach.KieuDongCuon;
     View.SoTrangBia   = this.GiaSachDigi.QuiCachSach.SoTrangBia;
     View.SoTrangRuot  = this.GiaSachDigi.QuiCachSach.SoTrangRuot;
     View.SoCuon       = this.GiaSachDigi.SoCuon;
     View.Bia          = this.GiaSachDigi.InBia;
     View.Ruot         = this.GiaSachDigi.InRuot;
     View.GiaInChiTiet = this.GiaSachDigi.GiaInChiTiet;
     View.DongCuon     = this.GiaSachDigi.DongCuon;
     View.BiaLayNgoai  = this.GiaSachDigi.QuiCachSach.BiaLayNgoai;
 }
Example #3
0
        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);
        }
Example #4
0
 public void Xoa_Cuon(GiaInSachDigi inCuon)
 {
     TinhGia.XoaCuon(inCuon);
 }
Example #5
0
 public void Them_Sach(GiaInSachDigi sachDigi)
 {
     TinhGia.ThemCuon(sachDigi);
 }
Example #6
0
 //Cập nhật cuốn không cần thiết vì tự cập nhật ở form rồi
 public void XoaCuon(GiaInSachDigi giaCuonDigi)
 {
     this.GiaInSachDigiS.Remove(giaCuonDigi);
 }
Example #7
0
 public void ThemCuon(GiaInSachDigi giaCuonDigi)
 {
     this.GiaInSachDigiS.Add(giaCuonDigi);
 }