Exemplo n.º 1
0
        private void frmNhanVien_Load(object sender, EventArgs e)
        {
            BUS_GiangHang bus_GH = new BUS_GiangHang();

            dgvNhanVien.DataSource = bus_NhanVien.GetData();
            DataTable dt = bus_GH.getGH();

            cboMaGH.DataSource    = dt;
            cboMaGH.ValueMember   = "MaGH";
            cboMaGH.DisplayMember = "TenGH";
        }
Exemplo n.º 2
0
 private void HoaDonBan_Load(object sender, EventArgs e)
 {
     /*cmb_MaCH.DataSource = CH.getdata();
      * cmb_MaCH.DisplayMember = "TenCH";
      * cmb_MaCH.ValueMember = "MaCH";*/
     txt_CH.Text            = fCH.layTenCH();
     cmb_MaKH.DataSource    = KH.GetData();
     cmb_MaKH.DisplayMember = "TenKH";
     cmb_MaKH.ValueMember   = "MaKH";
     cmb_MaNV.DataSource    = NV.GetData();
     cmb_MaNV.DisplayMember = "TenNV";
     cmb_MaNV.ValueMember   = "MaNV";
     load();
 }
Exemplo n.º 3
0
 private void FormXepPhong_Load(object sender, EventArgs e)
 {
     display();
     cbbNhanVien.DataSource    = bUS_NhanVien.GetData();
     cbbNhanVien.DisplayMember = "tenNhanVien";
     cbbNhanVien.ValueMember   = "NhanVienID";
 }
        private void FrmTaoPhieuCapPhat_Load(object sender, EventArgs e)
        {
            cbPhong.DataSource    = BUS_Phong.GetData();
            cbPhong.DisplayMember = "tenPhong";
            cbPhong.ValueMember   = "PhongId";

            cbNhanVien.DataSource    = BUS_NhanVien.GetData();
            cbNhanVien.DisplayMember = "tenNhanVien";
            cbNhanVien.ValueMember   = "NhanVienID";

            cbNguoiDung.DataSource    = BUS_NguoiDung.GetData();
            cbNguoiDung.DisplayMember = "tenDangNhap";
            cbNguoiDung.ValueMember   = "NguoiDungId";
            dateCapPhat.Text          = DateTime.Now.ToString();
        }
Exemplo n.º 5
0
        public FrmSuaPhieuCapPhat()
        {
            InitializeComponent();

            cbPhong.DataSource    = BUS_Phong.GetData();
            cbPhong.DisplayMember = "tenPhong";
            cbPhong.ValueMember   = "PhongId";

            cbNhanVien.DataSource    = BUS_NhanVien.GetData();
            cbNhanVien.DisplayMember = "tenNhanVien";
            cbNhanVien.ValueMember   = "NhanVienID";

            cbNguoiDung.DataSource    = BUS_NguoiDung.GetData();
            cbNguoiDung.DisplayMember = "tenDangNhap";
            cbNguoiDung.ValueMember   = "NguoiDungId";
        }
        public void LoadComBoBox()
        {
            cbPhong.DataSource    = BUS_Phong.GetData();
            cbPhong.DisplayMember = "tenPhong";
            cbPhong.ValueMember   = "PhongId";
            cbPhong.SelectedValue = "";

            cbNhanVien.DataSource    = BUS_NhanVien.GetData();
            cbNhanVien.DisplayMember = "tenNhanVien";
            cbNhanVien.ValueMember   = "NhanVienID";
            cbNhanVien.SelectedValue = 0;

            cbNguoiDung.DataSource    = BUS_NguoiDung.GetData();
            cbNguoiDung.DisplayMember = "tenDangNhap";
            cbNguoiDung.ValueMember   = "NguoiDungId";
            cbNguoiDung.SelectedValue = 0;
        }
        public void LoadComboxNV_ND()
        {
            //Nhân viên
            cbNhanVien.DataSource    = BUS_NhanVien.GetData();
            cbNhanVien.DisplayMember = "tenNhanVien";
            cbNhanVien.ValueMember   = "NhanVienId";
            cbNhanVien.SelectedValue = 0;

            //Người dùng

            cbNguoiDung.DataSource    = BUS_NguoiDung.GetData();
            cbNguoiDung.DisplayMember = "tenDangNhap";
            cbNguoiDung.ValueMember   = "NguoiDungId";
            cbNguoiDung.SelectedValue = 0;

            // date
            dateEdit1.DateTime = DateTime.Now;
        }
Exemplo n.º 8
0
        public void Init()
        {
            cbKhachHang.DataSource   = bus_KhachHang.getData();
            cbNhanVien.DataSource    = bus_NhanVien.GetData();
            cbNhanVien.DisplayMember = "TenNV";
            cbNhanVien.ValueMember   = "MaNV";
            cbLoaiHoaDon.Items.Add("le");
            cbLoaiHoaDon.Items.Add("si");
            cbLoaiHoaDon.Text = "le";
            txtTongTien.Text  = "0";
            SetDataGridview();
            //DataGridViewButtonColumn btn = new DataGridViewButtonColumn();
            //btn.Text = "Demo";
            //btn.UseColumnTextForButtonValue = true;
            //dataGridView1.Columns.Add(btn);

            //dgvRow.Cells["dgvtxtThanhTien"].Value = String.Format("this is 0,0!");
            //dataGridView1.Rows[1].Cells[0].Value = String.Format("this is 0,0!");
        }
Exemplo n.º 9
0
        private void UCThuTienPhong_Load(object sender, EventArgs e)
        {
            btnCapNhap.Visible = false;

            cbbNhanVienThu.DataSource    = BUS_NhanVien.GetData();
            cbbNhanVienThu.DisplayMember = "tenNhanVien";
            cbbNhanVienThu.ValueMember   = "NhanVienId";



            gridControl1.DataSource = BUS_PhieuThuTienPhong.PrintInfo();
            //gridView1.Columns[0].Visible = false;

            //load từ properties
            txtPhiPhong4.Text    = Properties.Settings.Default.PhiPhong4.ToString();
            txtPhiPhong6.Text    = Properties.Settings.Default.PhiPhong6.ToString();
            txtPhiPhong8.Text    = Properties.Settings.Default.PhiPhong8.ToString();
            dteTuNgay.EditValue  = Properties.Settings.Default.TuNgay;
            dteDenNgay.EditValue = Properties.Settings.Default.DenNgay;
        }
        private void FormTaoPhieuThuPhiPhong_Load(object sender, EventArgs e)
        {
            gridControl1.DataSource = BUS_DoiTuong.GetData();

            //cbbNguoiDung.DataSource = BUS_NguoiDung.GetData();
            //cbbNguoiDung.DisplayMember = "tenNguoiDung";
            //cbbNguoiDung.ValueMember = "NguoiDungId";

            cbbNguoiDung.SelectedText = Const.CurrentUser.TenDangNhap;

            cbbNhanVien.DataSource    = BUS_NhanVien.GetData();
            cbbNhanVien.DisplayMember = "tenNhanVien";
            cbbNhanVien.ValueMember   = "NhanVienId";

            txtTenNguoiLap.Text    = cbbNhanVien.Text;
            txtTenNguoiLap.Enabled = false;

            //load thuộc tính mặc định
            dteTuNgay.EditValue  = Properties.Settings.Default.TuNgay;
            dteDenNgay.EditValue = Properties.Settings.Default.DenNgay;
        }
Exemplo n.º 11
0
        public void LoadComBoBox()
        {
            cbPhong.DataSource    = BUS_Phong.GetData();
            cbPhong.DisplayMember = "tenPhong";
            cbPhong.ValueMember   = "PhongId";
            cbPhong.SelectedValue = "";

            cbNhanVien.DataSource    = BUS_NhanVien.GetData();
            cbNhanVien.DisplayMember = "tenNhanVien";
            cbNhanVien.ValueMember   = "NhanVienID";
            cbNhanVien.SelectedValue = 0;

            cbNguoiDung.DataSource    = BUS_NguoiDung.GetData();
            cbNguoiDung.DisplayMember = "tenDangNhap";
            cbNguoiDung.ValueMember   = "NguoiDungId";
            cbNguoiDung.SelectedValue = 0;

            cbVatTu.DataSource    = BUS_VatTu.GetData();
            cbVatTu.DisplayMember = "tenVatTu";
            cbVatTu.ValueMember   = "VatTuId";
            cbVatTu.SelectedValue = "";

            dateNgayBao.DateTime = DateTime.Now;
        }
Exemplo n.º 12
0
 void display()
 {
     gridControl1.DataSource = bUS_nhanvien.GetData();
     FixNColumnNames();
 }
Exemplo n.º 13
0
 public void load()
 {
     dataGridView1.DataSource = NV.GetData();
 }