Exemplo n.º 1
0
        private void btn_timkiem_Click_1(object sender, EventArgs e)
        {
            KETNOICSDL_ROOM.taoketnoi();
            dtgrview_phongtimkiem.DataSource = null;
            string sql_Statement = "select * from ROOM where MA_PHONG like '" + txt_timkiem.Text + "' or TEN_PHONG like '" + txt_timkiem.Text + "' or MA_LOAI like '" + txt_timkiem.Text + "' or SUC_CHUA like '" + txt_timkiem.Text + "' or GĐ like '" + txt_timkiem.Text + "'";

            dtgrview_phongtimkiem.DataSource = KETNOICSDL_ROOM.laydulieu(sql_Statement, "ROOM");
        }
Exemplo n.º 2
0
        private void Load_DuLieu(object sender, EventArgs e)
        {
            dtgrview_phonginfo.DataSource = null;
            string SQL = "Select * from ROOM";

            dtgrview_phonginfo.DataSource = null;
            dtgrview_phonginfo.DataSource = KETNOICSDL_ROOM.loaddulieu(SQL, "ROOM");
            HienThi_DL();
        }
Exemplo n.º 3
0
        private void btn_chen_Click(object sender, EventArgs e)
        {
            try
            {
                string a  = txt_maphong.Text;
                string b  = txt_tenphong.Text;
                string c  = txt_maloai.Text;
                string a1 = txt_succhua.Text;
                string a2 = txt_gd.Text;

                KETNOICSDL_ROOM.chendulieu(a, b, c, a1, a2);
                Load_DuLieu(null, null);
            }
            catch (OleDbException Exception)
            {
                String a = Convert.ToString(Exception.ErrorCode);
                MessageBox.Show(a);
            }
        }
Exemplo n.º 4
0
        private void load(object sender, EventArgs e)
        {
            string sql = "SELECT * from TKB";

            grd_tkb.DataSource = null;
            grd_tkb.DataSource = ketnoiCSDL_TKB.laydl(sql, "TKB");

            string SQL = "Select * from LOP";

            grd_lop.DataSource = null;
            grd_lop.DataSource = KeyNoiCSDL_LOP.LoadDuLieu(SQL, "LOP");

            string SQL1 = "Select * from QLTTB";

            grd_TB.DataSource = null;
            grd_TB.DataSource = KetNoiCSDL_TB.LoadDuLieu(SQL1, "QLTTB");

            string SQL2 = "Select * from ROOM";

            grd_room.DataSource = null;
            grd_room.DataSource = KETNOICSDL_ROOM.laydulieu(SQL2, "ROOM");
        }
Exemplo n.º 5
0
 public FrmPhongsearch()
 {
     InitializeComponent();
     KETNOICSDL_ROOM.taoketnoi();
 }
Exemplo n.º 6
0
 private void btn_luu_Click(object sender, EventArgs e)
 {
     KETNOICSDL_ROOM.luudulieu(txt_maphong.Text, txt_tenphong.Text, txt_maloai.Text, txt_succhua.Text, txt_gd.Text);
     Load_DuLieu(null, null);
 }
Exemplo n.º 7
0
 private void btn_xoa_Click(object sender, EventArgs e)
 {
     KETNOICSDL_ROOM.xoadulieu(txt_maphong.Text);
     Load_DuLieu(null, null);
 }