Esempio n. 1
0
 public frmSachMuon()
 {
     InitializeComponent();
     sachMuonControll = new SachMuonController();
     docGiaControll   = new DocGiaController();
     sachControll     = new SachController();
     LoadCBB();
     _txtmamuon.IsReadOnly      = true;
     _txtdiachidg.IsReadOnly    = true;
     _txtkhoadg.IsReadOnly      = true;
     _txtlopdg.IsReadOnly       = true;
     _txttendg.IsReadOnly       = true;
     _txttienkiguidg.IsReadOnly = true;
     LoadSachMuonTable();
     if (App.Role.AddAll == true)
     {
         _btnadd.IsEnabled        = true;
         _btnadd_cancel.IsEnabled = true;
     }
     else
     {
         if (App.Role.AddSachMuon != true)
         {
             _btnadd.IsEnabled        = false;
             _btnadd_cancel.IsEnabled = false;
         }
     }
     if (App.Role.EditAll == true)
     {
         _btnsave.IsEnabled = true;
     }
     else
     {
         if (App.Role.EditSachMuon != true)
         {
             _btnsave.IsEnabled = false;
         }
     }
     if (App.Role.DeleteAll == true)
     {
         _btndelete.IsEnabled = true;
     }
     else
     {
         if (App.Role.DeleteSachMuon != true)
         {
             _btndelete.IsEnabled = false;
         }
     }
 }
Esempio n. 2
0
        public frmDocGia()
        {
            InitializeComponent();
            docGiaControll   = new DocGiaController();
            sachMuonControll = new SachMuonController();
            LoadCBB();
            LoadDocGiaTable();

            if (App.Role.AddAll == true)
            {
                _btnadd.IsEnabled        = true;
                _btnadd_cancel.IsEnabled = true;
            }
            else
            {
                if (App.Role.AddDocGia != true)
                {
                    _btnadd.IsEnabled        = false;
                    _btnadd_cancel.IsEnabled = false;
                }
            }
            if (App.Role.EditAll == true)
            {
                _btnsave.IsEnabled = true;
            }
            else
            {
                if (App.Role.EditDocGia != true)
                {
                    _btnsave.IsEnabled = false;
                }
            }

            if (App.Role.DeleteAll == true)
            {
                _btndelete.IsEnabled = true;
            }
            else
            {
                if (App.Role.DeleteDocGia != true)
                {
                    _btndelete.IsEnabled = false;
                }
            }
        }