Esempio n. 1
0
 internal void PageLoad(object sender, RoutedEventArgs e)
 {
     View = (RoleEditView)sender;
     if (View.MD != null)
     {
         //View = (FuncModuleUpdateView)sender;
         View.Title           = "修改";
         View.TitleImg.Source = new BitmapImage(new Uri("pack://siteoforigin:,,,/image/modify.png"));
         md = View.MD;//页面传参
         View.txtID.Text       = md.ID.ToString();
         View.txtCode.Text     = md.Code.ToString();
         View.txtName.Text     = md.Name;
         View.txtRemark.Text   = md.Remark;
         View.txtMenu.Text     = md.MenuPermission;
         View.txtModule.Text   = md.ModulePermission;
         View.txtResource.Text = md.SourcePermission;
         View.txtCURD.Text     = md.CRUDPermission;
         Loadcmb();
         View.cmbJurisdiction.SelectedValue = md.JurisdictionID;
     }
     else
     {
         View.Title           = "添加";
         View.TitleImg.Source = new BitmapImage(new Uri("pack://siteoforigin:,,,/image/add.png"));
         //View.txtgnbh.Focus();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 添加记录
        /// </summary>
        private void BtnInsert_Click(object sender)
        {
            // NavigationService.Navigate(new Uri("/Views/Maintenance/RFIDAddView.xaml", UriKind.RelativeOrAbsolute));
            RoleEditView view = new RoleEditView(null);

            view.ShowDialog();
            BtnSearch_Click(null);
        }
Esempio n. 3
0
 /// <summary>
 /// 修改记录
 /// </summary>
 private void BtnUpdate_Click(object sender)
 {
     if (View.DGSelect.SelectedItem == null)
     {
         MessageBox.Show("请选择要修改的记录!");
     }
     foreach (var item in View.DGSelect.Items)
     {
         if (View.DGSelect.SelectedItem == item)
         {
             Role model = item as Role;
             //FuncModule gnmk = (FuncModule)sender;
             RoleEditView view = new RoleEditView(model);
             view.ShowDialog();
             BtnSearch_Click(null);
         }
     }
 }