Esempio n. 1
0
 public ControlDaiLy()
 {
     InitializeComponent();
     SetReadOnly();
     hsBus = new HoSoBUS();
     HoSoGrid.DataSource = hsBus.Load();
     FunctionsCombo(function);
 }
Esempio n. 2
0
 public Rules_DaiLy()
 {
     InitializeComponent();
     hsBus = new HoSoBUS();
     LoaiDaiLyMax_txt.Enabled = false;
     DaiLyMax_txt.Enabled     = false;
     quanToiDa_txt.Enabled    = false;
 }
Esempio n. 3
0
        private void frmTiepNhanXeSua_Load(object sender, EventArgs e)
        {
            hsBus = new HoSoBUS();
            hxBus = new HieuXeBUS();
            loadHieuXeVao_combobox();
            this.loadData_Vao_GridView();
            bt_sua.Enabled = false;
            bt_xoa.Enabled = false;
            cb_hieuxe.Text = "";
            int mahs = data_tiepnhan.RowCount + 1;

            tb_ma.Text = mahs.ToString();
        }
Esempio n. 4
0
 public XoaLoaiFrm()
 {
     InitializeComponent();
     hsBus = new HoSoBUS();
 }
Esempio n. 5
0
 private void ControlMain_Load(object sender, EventArgs e)
 {
     hsBUS = new HoSoBUS();
     quyDinhGrid.DataSource = hsBUS.QuyDinh();
 }
Esempio n. 6
0
 public frmPhieuThuTien(HoSoDTO hs)
 {
     hsBus      = new HoSoBUS();
     this.hsDTO = hs;
     InitializeComponent();
 }
Esempio n. 7
0
        private void confirm_btn_Click(object sender, EventArgs e)
        {
            hsBus = new HoSoBUS();
            if (function.Text == "Thêm")
            {
                HoSoDTO hs = new HoSoDTO();
                hs.ma        = int.Parse(maHoSo_Txt.Text);
                hs.tenHoSo   = tenHoSo_Txt.Text;
                hs.loai      = int.Parse(loaiHoSo_Txt.Text);
                hs.tenQuan   = quanHoSo_Txt.Text;
                hs.dienThoai = long.Parse(dtHoSo_Txt.Text);
                hs.day       = dateHoSo_Txt.Value;
                hs.diaChi    = diaChiHoSo_Txt.Text;
                hs.email     = emailHoSo_Txt.Text;

                bool kq = hsBus.them(hs);
                if (kq == false)
                {
                    MessageBox.Show("Thêm hồ sơ thất bại");
                }
                else
                {
                    MessageBox.Show("Thêm hồ sơ thành công");
                }
            }

            if (function.Text == "Xóa")
            {
                HoSoDTO hs = new HoSoDTO();
                hs.ma = int.Parse(maHoSo_Txt.Text);
                bool kq = hsBus.xoa(hs);
                if (kq == false)
                {
                    MessageBox.Show("Xóa sơ thất bại");
                }
                else
                {
                    MessageBox.Show("Xóa sơ thành công");
                }
            }

            if (function.Text == "Tìm")
            {
                //Check for valid text
                HoSoDTO hs = new HoSoDTO();
                if (maHoSo_Txt.Text.Trim().Length > 0)
                {
                    hs.ma = int.Parse(maHoSo_Txt.Text);
                }
                hs.tenHoSo = tenHoSo_Txt.Text;
                hs.tenQuan = quanHoSo_Txt.Text;
                if (dtHoSo_Txt.Text.Trim().Length > 0)
                {
                    hs.dienThoai = long.Parse(dtHoSo_Txt.Text);
                }
                if (loaiHoSo_Txt.Text.Trim().Length > 0)
                {
                    hs.loai = int.Parse(loaiHoSo_Txt.Text);
                }
                hs.email            = emailHoSo_Txt.Text;
                hs.diaChi           = diaChiHoSo_Txt.Text;
                HoSoGrid.DataSource = hsBus.search(hs, ngay);
            }

            if (function.Text == "Sửa")
            {
                HoSoDTO hs = new HoSoDTO();
                hs.ma        = int.Parse(maHoSo_Txt.Text);
                hs.tenHoSo   = tenHoSo_Txt.Text;
                hs.loai      = int.Parse(loaiHoSo_Txt.Text);
                hs.tenQuan   = quanHoSo_Txt.Text;
                hs.dienThoai = long.Parse(dtHoSo_Txt.Text);
                hs.day       = dateHoSo_Txt.Value;
                hs.diaChi    = diaChiHoSo_Txt.Text;
                hs.email     = emailHoSo_Txt.Text;

                bool kq = hsBus.sua(hs);
                if (kq == false)
                {
                    MessageBox.Show("Sửa hồ sơ thất bại");
                }
                else
                {
                    MessageBox.Show("Sửa hồ sơ thành công");
                }
            }
            if (function.Text != "Tìm")
            {
                HoSoGrid.DataSource = hsBus.Load();
            }
            ClearAll();
            SetReadOnly();
            function.Text = string.Empty;
        }
Esempio n. 8
0
 public Rules_LoaiDaiLy()
 {
     InitializeComponent();
     hsBus = new HoSoBUS();
     loaiDaiLyGrid.DataSource = hsBus.LoadLoaidaiLy();
 }
Esempio n. 9
0
 private void frmTraCuuXe_Load(object sender, EventArgs e)
 {
     hsBus = new HoSoBUS();
     hxBus = new HieuXeBUS();
     loadHieuXeVao_combobox();
 }
Esempio n. 10
0
 public Rules_Quan()
 {
     InitializeComponent();
     hsBus = new HoSoBUS();
     quanGrid.DataSource = hsBus.loadQuan();
 }