コード例 #1
0
        public GiaInOffsetForm(ThongTinBanDauChoGiaIn thongTinBanDau)
        {
            InitializeComponent();
            //
            this.IdHangKH  = thongTinBanDau.IdHangKhachHang;
            this.SoToChay  = thongTinBanDau.SoToChay;
            this.IdMayIn   = thongTinBanDau.IdToIn_MayIn;
            this.IdBaiIn   = thongTinBanDau.IdBaiIn;
            this.KhoToChay = thongTinBanDau.KhoToChay;
            giaInPres      = new GiaInOffsetPresenter(this);
            //Nạp bảng giá vô combo


            //-event

            txtSoLuongToChay.KeyPress += new KeyPressEventHandler(InputValidator);
            txtPhiVanChuyen.KeyPress  += new KeyPressEventHandler(InputValidator);
            txtPhiCanhBai.KeyPress    += new KeyPressEventHandler(InputValidator);

            txtKhoToGiayChay.TextChanged += new EventHandler(TextBoxes_TextedChanged);
            txtPhiCanhBai.TextChanged    += new EventHandler(TextBoxes_TextedChanged);
            txtPhiVanChuyen.TextChanged  += new EventHandler(TextBoxes_TextedChanged);

            rdbMotMat.CheckedChanged    += new EventHandler(RadioButtons_CheckChanged);
            rdbTuTro.CheckedChanged     += new EventHandler(RadioButtons_CheckChanged);
            rdbTuTroNhip.CheckedChanged += new EventHandler(RadioButtons_CheckChanged);
            rdbAB.CheckedChanged        += new EventHandler(RadioButtons_CheckChanged);
        }
コード例 #2
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);
        }