Example #1
0
 private void frmMainServer_Load(object sender, EventArgs e)
 {
     LoadKhoHang();
     PhanQuyen();
     CH        = CuaHangBUS.GetThongTinCuaHang(User.MaCuaHang);
     this.Text = CH.TenCuaHang;
 }
Example #2
0
 private void frmMainClient_Load(object sender, EventArgs e)
 {
     // TODO: This line of code loads data into the 'galaxyMobileDataSet1.KhachHang' table. You can move, or remove it, as needed.
     //this.khachHangTableAdapter.Fill(this.galaxyMobileDataSet1.KhachHang);
     PhanQuyen();
     CH        = CuaHangBUS.GetThongTinCuaHang(User.MaCuaHang);
     this.Text = CH.TenCuaHang;
 }
Example #3
0
        private void cmBoxMaCH_SelectedIndexChanged(object sender, EventArgs e)
        {
            var ch = CuaHangBUS.GetThongTinCuaHang(cmBoxMaCH.SelectedValue.ToString());

            if (ch != null)
            {
                txtboxTenCuaHang.Text = ch.TenCuaHang;
                txtboxDiaChiCH.Text   = ch.DiaChi;
                txtboxMaCH.Text       = ch.MaCuaHang;
            }
        }
Example #4
0
        private void frmInHoaDon_Load(object sender, EventArgs e)
        {
            InHoaDon_ResultBindingSource.DataSource = HoaDonBUS.InHD(IDHD, IDCH);
            HoaDon    hd = HoaDonBUS.Get1HD(IDHD, IDCH);
            KhachHang kh = KHBUS.GetKHByMAKH(hd.MaKH);
            CuaHang   ch = CuaHangBUS.GetThongTinCuaHang(hd.MaCuaHang);

            Microsoft.Reporting.WinForms.ReportParameter[] rParams = new Microsoft.Reporting.WinForms.ReportParameter[]
            {
                new Microsoft.Reporting.WinForms.ReportParameter("DateNhap", hd.NgayLapHD.ToShortDateString().ToString()),
                new Microsoft.Reporting.WinForms.ReportParameter("TongTien", ChiTietHoaDonBUS.TinhTien_ByMaHD(IDHD, IDCH).ToString()),
                new Microsoft.Reporting.WinForms.ReportParameter("TenCH", ch.TenCuaHang),
                new Microsoft.Reporting.WinForms.ReportParameter("DiaChi", ch.DiaChi),
                new Microsoft.Reporting.WinForms.ReportParameter("TenNguoiMua", kh.TenKH),
                new Microsoft.Reporting.WinForms.ReportParameter("DiaChiNguoiMua", kh.DiaChi),
                new Microsoft.Reporting.WinForms.ReportParameter("SDT", kh.SDT),
                new Microsoft.Reporting.WinForms.ReportParameter("HtGiaoHang", hd.HTGiaoHang),
                new Microsoft.Reporting.WinForms.ReportParameter("MaHD", IDHD)
            };


            reportInHD.LocalReport.SetParameters(rParams);
            this.reportInHD.RefreshReport();
        }