Example #1
0
        private void cmdThemMoi_Click(object sender, EventArgs e)
        {
            var objRoom = new NoitruDmucBuong();
            var frm     = new frm_Add_PhongNoiTru();

            frm.objRoom       = objRoom;
            frm.m_enAct       = action.Insert;
            frm.p_dtDataPhong = globalVariables.gv_PhongNoitru;
            frm.MyGetData     = new frm_Add_PhongNoiTru.timkiem(LoadData);
            frm.grdList       = grdRoom;
            frm.ShowDialog();
            ModifyCommand();
        }
 private void cmdSua_Click(object sender, EventArgs e)
 {
     int idphong = Utility.Int32Dbnull(grdRoom.GetValue(NoitruDmucBuong.Columns.IdBuong));
     NoitruDmucBuong objRoom = NoitruDmucBuong.FetchByID(idphong);
     if (objRoom != null)
     {
         var frm = new frm_Add_PhongNoiTru();
         frm.objRoom = objRoom;
         frm.m_enAct = action.Update;
         frm.p_dtDataPhong = globalVariables.gv_PhongNoitru;
         frm.grdList = grdRoom;
         frm.MyGetData = new frm_Add_PhongNoiTru.timkiem(LoadData);
         frm.ShowDialog();
     }
     ModifyCommand();
 }
Example #3
0
        private void cmdSua_Click(object sender, EventArgs e)
        {
            int             idphong = Utility.Int32Dbnull(grdRoom.GetValue(NoitruDmucBuong.Columns.IdBuong));
            NoitruDmucBuong objRoom = NoitruDmucBuong.FetchByID(idphong);

            if (objRoom != null)
            {
                var frm = new frm_Add_PhongNoiTru();
                frm.objRoom       = objRoom;
                frm.m_enAct       = action.Update;
                frm.p_dtDataPhong = globalVariables.gv_PhongNoitru;
                frm.grdList       = grdRoom;
                frm.MyGetData     = new frm_Add_PhongNoiTru.timkiem(LoadData);
                frm.ShowDialog();
            }
            ModifyCommand();
        }
 private void cmdThemMoi_Click(object sender, EventArgs e)
 {
     var objRoom = new NoitruDmucBuong();
     var frm = new frm_Add_PhongNoiTru();
     frm.objRoom = objRoom;
     frm.m_enAct = action.Insert;
     frm.p_dtDataPhong = globalVariables.gv_PhongNoitru;
     frm.MyGetData=new frm_Add_PhongNoiTru.timkiem(LoadData);
     frm.grdList = grdRoom;
     frm.ShowDialog();
     ModifyCommand();
 }