示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            DataRow cn = dsChiNhanh.NewRow();

            cn["MaCN"]      = tbMaCn.Text;
            cn["Ten"]       = tbTen.Text;
            cn["DiaChi"]    = tbDiaChi.Text;
            cn["DienThoai"] = tbDienThoai.Text;
            cn["TinhThanh"] = tbTinhThanh.Text;
            dsChiNhanh.Rows.Add(cn);
            XuLyDuLieu.ghiBang("DanhMucChiNhanh", dsChiNhanh);
        }
示例#2
0
        private void BoPhanQuanLi_Load(object sender, EventArgs e)
        {
            danhmuc = DocBangDanhMuc();
            dgvDoanhThu.DataSource        = danhmuc;
            dsChiNhanh                    = XuLyDuLieu.docBang("Select *From DanhMucChiNhanh");
            dsChiNhanhView                = new DataView(dsChiNhanh);
            dgvDanhMucChinhanh.DataSource = dsChiNhanhView;
            comboBox1.DataSource          = DocBangDanhMuc();
            comboBox1.DisplayMember       = "Loai";
            /// comboBox1.SelectedItem = "Tên";
            comboBox1.ValueMember = "Tên";

            BanHangChiNhanh f = new BanHangChiNhanh();

            f.Show();
        }