Exemple #1
0
        public GiaInNhanhForm(ThongTinBanDauChoGiaIn thongTinBanDau, MucGiaIn giaIn)
        {
            InitializeComponent();

            //Thông tin ban đầu cho form
            this.Text          = thongTinBanDau.TieuDeForm;
            this.TinhTrangForm = thongTinBanDau.TinhTrangForm;
            this.ThongTinGiay  = thongTinBanDau.ThongTinGiay;

            //Tạo Present
            giaInPres = new GiaInNhanhPresenter(this, giaIn);
            //Load data hang KH

            //Nạp bảng giá vô combo
            LoadHangKhachHang();
            LoadNiemYetGiaTheoHangKH();
            //Cập nhật mục giá In vô View
            giaInPres.CapNhatMucGiaInVoView();

            //Chọn bảng giá ở đây
            if (this.TinhTrangForm == FormStateS.Edit)
            {
                this.IdNiemYetChon = giaIn.IdNiemYetGiaInNhanh;
            }

            //-event
            txtSoTrangA4.TextChanged  += new EventHandler(TextBoxes_TextedChanged);
            txtSoLuongToChay.KeyPress += new KeyPressEventHandler(InputValidator);

            rdbInMotMat.CheckedChanged += new EventHandler(RadioButtons_CheckChanged);
            rdbInHaiMat.CheckedChanged += new EventHandler(RadioButtons_CheckChanged);

            cboNiemYetGia.SelectedIndexChanged += new EventHandler(ComboBoxes_SelectedIndexChanged);
        }
        public GiaInOffsetPresenter(IViewGiaInOffset view, MucGiaIn giaIn = null)
        {
            View = view;//Một số giá trị ban đầu
            View.PhiVanChuyen = 200000;
            View.PhiCanhBai   = 100000;
            if (giaIn != null)
            {
                this.DocGiaIn = giaIn;
            }
            else
            {
                _giaIn = new MucGiaIn(0, 0, 0, 0, 0, "", 0, 0, 2);
            }
            //Xem vấn đề mới và sửa
            switch (View.TinhTrangForm)
            {
            case FormStateS.New:
                break;

            case FormStateS.Edit:
                giaIn.ID = View.ID;
                break;
            }
        }
Exemple #3
0
 public void SuaGiaIn(MucGiaIn giaIn)
 {
     MucBaiIn.Sua_GiaIn(giaIn);
 }
Exemple #4
0
 public void ThemGiaIn(MucGiaIn giaIn)
 {
     MucBaiIn.Them_GiaIn(giaIn);
 }
        public GiaInNhanhPresenter(IViewGiaInNhanh view, MucGiaIn mucGiaIn)
        {
            View = view;

            this._mucGiaInNhanh = mucGiaIn;
        }