Example #1
0
        private void cmdThemGiuong_Click(object sender, EventArgs e)
        {
            var objBed = new NoitruDmucGiuongbenh();
            var frm    = new frm_Add_GiuongNoiTru();

            frm.objBed         = objBed;
            frm.m_enAct        = action.Insert;
            frm.p_dtDataGiuong = m_dtDataGiuong;
            frm.grdList        = grdBed;
            frm.MyGetData      = new frm_Add_GiuongNoiTru.timkiem(LoadData);
            frm.ShowDialog();
            ModifyCommand();
        }
 private void cmdSuaGiuong_Click(object sender, EventArgs e)
 {
     int idphong = Utility.Int32Dbnull(grdBed.GetValue(NoitruDmucGiuongbenh.Columns.IdGiuong));
     NoitruDmucGiuongbenh objBed = NoitruDmucGiuongbenh.FetchByID(idphong);
     if (objBed != null)
     {
         var frm = new frm_Add_GiuongNoiTru();
         frm.objBed = objBed;
         frm.m_enAct = action.Update;
         frm.p_dtDataGiuong = m_dtDataGiuong;
         frm.grdList = grdBed;
         frm.MyGetData = new frm_Add_GiuongNoiTru.timkiem(LoadData);
         frm.ShowDialog();
     }
     ModifyCommand();
 }
Example #3
0
        private void cmdSuaGiuong_Click(object sender, EventArgs e)
        {
            int idphong = Utility.Int32Dbnull(grdBed.GetValue(NoitruDmucGiuongbenh.Columns.IdGiuong));
            NoitruDmucGiuongbenh objBed = NoitruDmucGiuongbenh.FetchByID(idphong);

            if (objBed != null)
            {
                var frm = new frm_Add_GiuongNoiTru();
                frm.objBed         = objBed;
                frm.m_enAct        = action.Update;
                frm.p_dtDataGiuong = m_dtDataGiuong;
                frm.grdList        = grdBed;
                frm.MyGetData      = new frm_Add_GiuongNoiTru.timkiem(LoadData);
                frm.ShowDialog();
            }
            ModifyCommand();
        }
 private void cmdThemGiuong_Click(object sender, EventArgs e)
 {
     var objBed = new NoitruDmucGiuongbenh();
     var frm = new frm_Add_GiuongNoiTru();
     frm.objBed = objBed;
     frm.m_enAct = action.Insert;
     frm.p_dtDataGiuong = m_dtDataGiuong;
     frm.grdList = grdBed;
     frm.MyGetData = new frm_Add_GiuongNoiTru.timkiem(LoadData);
     frm.ShowDialog();
     ModifyCommand();
 }