Exemple #1
0
        void BtnView_Click(object sender, RoutedEventArgs e)
        {
            if (Senddoctype != null)
            {
                DocTypeForm AddWin = new DocTypeForm(Action.Read, Senddoctype);
                EntityBrowser browser = new EntityBrowser(AddWin);
                browser.FormType = FormTypes.Browse;
                browser.MinHeight = 400;
                browser.MinWidth = 600;
                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(AddWin_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_SENDDOCTYPE DocTypeInfoT = new T_OA_SENDDOCTYPE();

            //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)
            //            {                            
            //                DocTypeInfoT = cb1.Tag as T_OA_SENDDOCTYPE;
            //                break;
            //            }
            //        }
            //    }

            //}

            
            //if (!string.IsNullOrEmpty(DocTypeInfoT.SENDDOCTYPEID))
            //{   
            //    DocTypeForm AddWin = new DocTypeForm(Action.Read, DocTypeInfoT);
            //    EntityBrowser browser = new EntityBrowser(AddWin);
            //    browser.MinHeight = 300;
            //    browser.MinWidth = 320;
            //    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(AddWin_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)
 {
     T_OA_SENDDOCTYPE doctype = new T_OA_SENDDOCTYPE();
     DocTypeForm AddWin = new DocTypeForm(Action.Add, doctype);
     EntityBrowser browser = new EntityBrowser(AddWin);
     browser.MinHeight = 240;
     browser.MinWidth = 600;
     browser.ReloadDataEvent += new EntityBrowser.refreshGridView(AddWin_ReloadDataEvent);
     browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
 }
Exemple #3
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {

            if (Senddoctype != null)
            {
                if (SMT.SaaS.FrameworkUI.Common.Utility.ToolBarButtonOperationPermission(Senddoctype, "OABUMFDOCTYPE", OperationType.Edit, Common.CurrentLoginUserInfo.EmployeeID))
                {
                    DocTypeForm AddWin = new DocTypeForm(Action.Edit, Senddoctype);
                    EntityBrowser browser = new EntityBrowser(AddWin);
                    browser.MinHeight = 400;
                    browser.MinWidth = 600;
                    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(AddWin_ReloadDataEvent);
                    browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
                }
                else
                {


                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("YOUDONOTHAVEPERMISSIONTOOPERATETHEDATA"),
                    Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);

                }
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }


            //T_OA_SENDDOCTYPE DocTypeInfoT = new T_OA_SENDDOCTYPE();

            //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)
            //            {                            
            //                DocTypeInfoT = cb1.Tag as T_OA_SENDDOCTYPE;
            //                break;
            //            }
            //        }
            //    }

            //}

            
            //if (!string.IsNullOrEmpty(DocTypeInfoT.SENDDOCTYPEID))
            //{   
            //    DocTypeForm AddWin = new DocTypeForm(Action.Edit, DocTypeInfoT);
            //    EntityBrowser browser = new EntityBrowser(AddWin);
            //    browser.MinHeight = 300;
            //    browser.MinWidth = 320;
            //    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(AddWin_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;
            //}

        }