Exemplo n.º 1
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            if (DaGr.SelectedItem != null)  //if (Meetingtype != null)   zhaowp 2010.08.19 修改
            {
                MeetingTypeForm form    = new MeetingTypeForm(Action.Edit, Meetingtype.MEETINGTYPEID);
                EntityBrowser   browser = new EntityBrowser(form);
                browser.MinHeight        = 500;
                browser.MinWidth         = 680;
                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            ////会议类型ID
            //string TypeId = "";
            //T_OA_MEETINGTYPE MeetingTypeT = new T_OA_MEETINGTYPE();
            //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)
            //            {
            //                MeetingTypeT = cb1.Tag as T_OA_MEETINGTYPE;
            //                //TypeId = cb1.Tag.ToString();
            //                TypeId = MeetingTypeT.MEETINGTYPEID;
            //                break;
            //            }
            //        }
            //    }

            //}


            //if (string.IsNullOrEmpty(TypeId))
            //{
            //    ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
            //}
            //else
            //{
            //    MeetingTypeForm form = new MeetingTypeForm(Action.Edit, TypeId);
            //    EntityBrowser browser = new EntityBrowser(form);
            //    browser.MinHeight = 500;
            //    browser.MinWidth = 500;
            //    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            //    browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) =>{});

            //}
        }
Exemplo n.º 2
0
        private void btnNew_Click(object sender, RoutedEventArgs e)
        {
            MeetingTypeForm form    = new MeetingTypeForm(Action.Add, "");
            EntityBrowser   browser = new EntityBrowser(form);

            browser.MinHeight        = 500;
            browser.MinWidth         = 680;
            browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => {});

            //AddMeetingType AddWin = new AddMeetingType("Add");
            //AddWin.Show();
            //AddWin.ReloadDataEvent += new AddMeetingType.refreshGridView(AddWin_ReloadDataEvent);
        }
Exemplo n.º 3
0
 void BtnView_Click(object sender, RoutedEventArgs e)
 {
     if (DaGr.SelectedItem != null)  //if (Meetingtype != null)   zhaowp 2010.08.19 修改
     {
         MeetingTypeForm form    = new MeetingTypeForm(Action.Read, Meetingtype.MEETINGTYPEID);
         EntityBrowser   browser = new EntityBrowser(form);
         browser.FormType         = FormTypes.Browse;
         browser.MinHeight        = 600;
         browser.MinWidth         = 680;
         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;
     }
 }