Exemple #1
0
        void BtnView_Click(object sender, RoutedEventArgs e)
        {

            if (Docgrade != null)
            {
                GradeForm AddWin = new GradeForm(Action.Read, Docgrade);
                EntityBrowser browser = new EntityBrowser(AddWin);
                browser.MinHeight = 220;
                browser.MinWidth = 300;
                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "VIEW"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }


            //T_OA_GRADED GradeInfoT = new T_OA_GRADED();

            //if (DaGr.ItemsSource != null)
            //{
            //    foreach (object obj in DaGr.ItemsSource)
            //    {
            //        if (DaGr.Columns[0].GetCellContent(obj) != null)
            //        {
            //            CheckBox cb1 = DaGr.Columns[0].GetCellContent(obj).FindName("myChkBox") as CheckBox; //cb为
            //            if (cb1.IsChecked == true)
            //            {
            //                GradeInfoT = cb1.Tag as T_OA_GRADED;
            //                break;
            //            }
            //        }
            //    }

            //}


            //if (!string.IsNullOrEmpty(GradeInfoT.GRADEDID))
            //{                                
            //    GradeForm AddWin = new GradeForm(Action.Read, GradeInfoT);
            //    EntityBrowser browser = new EntityBrowser(AddWin);
            //    browser.MinHeight = 220;
            //    browser.MinWidth = 300;
            //    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            //    browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
            //}
            //else
            //{
            //    //MessageBox.Show("请选择需要修改的公文类型");
            //    ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
            //    return;
            //}
        }
Exemple #2
0
 private void btnNew_Click(object sender, RoutedEventArgs e)
 {
     
     GradeForm AddWin = new GradeForm(Action.Add, tmpGrade);
     EntityBrowser browser = new EntityBrowser(AddWin);
     browser.MinHeight = 220;
     browser.MinWidth = 300;
     browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
     browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
 }