예제 #1
0
        public static void ShowCompanyDoc(string FormId)
        {
            CompanyDocWebPart SendDocform = new CompanyDocWebPart(FormId);

            System.Windows.Controls.Window wd = new System.Windows.Controls.Window();
            wd.MinWidth     = 980;
            wd.MinHeight    = 460;
            wd.Content      = SendDocform;
            wd.TitleContent = "公司发文";

            wd.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true, false, FormId);
        }
예제 #2
0
        private void ShowPreviewSendDoc()
        {
            string StrNum = this.txtNUM.Text.ToString();
            string StrPublish = this.dpPublishDate.Text.ToString();
            if (!string.IsNullOrEmpty(StrPublish))
            {
                StrPublish = System.Convert.ToDateTime(StrPublish).ToLongDateString();
            }
            if (string.IsNullOrEmpty(StrNum))
            {
                Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("PROMPT"), "公文文号不能为空");

            }
            else
            {
                //V_BumfCompanySendDoc SendDocInfoT = new V_BumfCompanySendDoc();
                //PriviewSendDoc AddWin = new PriviewSendDoc(tmpdoc.SENDDOCID,StrNum,StrPublish);
                CompanyDocWebPart AddWin = new CompanyDocWebPart(tmpdoc.SENDDOCID, StrNum, StrPublish);
                System.Windows.Controls.Window wd = new System.Windows.Controls.Window();
                wd.MinWidth = 900;
                wd.MinHeight = 500;
                wd.Content = AddWin;
                wd.TitleContent = "公文预览";
                wd.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true, false, tmpdoc.SENDDOCID);
            }
        }
예제 #3
0
        private void SendDocDetailBtn_Click(object sender, RoutedEventArgs e)
        {
            if (Companysenddoc != null)
            {
                //MySendDocForm DetailWin = new MySendDocForm(Companysenddoc);
                CompanyDocWebPart AddWin = new CompanyDocWebPart(Companysenddoc.OACompanySendDoc.SENDDOCID);
                System.Windows.Controls.Window wd = new System.Windows.Controls.Window();
                wd.MinWidth = 1050;
                wd.MinHeight = 500;
                wd.Content = AddWin;
                wd.TitleContent = "查看公文"+ Companysenddoc.OACompanySendDoc.SENDDOCTITLE +"信息";
                wd.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true, false, Companysenddoc.OACompanySendDoc.SENDDOCID);

                //CompanyDocWebPart DetailWin = new CompanyDocWebPart(Companysenddoc.OACompanySendDoc.SENDDOCID);
                //EntityBrowser browser = new EntityBrowser(DetailWin);
                //browser.FormType = FormTypes.Browse;
                //browser.MinWidth = 850;
                //browser.MinHeight = 520;
                //browser.Content = "查看公文信息";
                //browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "VIEW"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }


            //V_BumfCompanySendDoc SendDocInfoT = new V_BumfCompanySendDoc();

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

            //}

            
            //if (SendDocInfoT.OACompanySendDoc != null)
            //{
            //    CompanyDocForm AddWin = new CompanyDocForm(FormTypes.Edit, SendDocInfoT);
            //    SendDocInfoForm DetailWin = new SendDocInfoForm(SendDocInfoT);
            //    EntityBrowser browser = new EntityBrowser(DetailWin);
            //    browser.Width = 500;
            //    browser.Height = 520;                
            //    browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });
            //}
            //else
            //{
            //    //MessageBox.Show("请选择需要修改的公文类型");
            //    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTWARNING", "VIEW"));
            //    return;
            //}
            

        }
예제 #4
0
        private void HyperlinkButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                V_SystemNotice source = (sender as HyperlinkButton).DataContext as V_SystemNotice;
                //NewsShow newsview = new NewsShow() { ViewModel = source };

                switch (source.Formtype)
                {
                case "会议通知":    //会议通知
                    MeetingNoticeWebPart form    = new MeetingNoticeWebPart(source.FormId);
                    EntityBrowser        browser = new EntityBrowser(form);
                    browser.MinHeight        = 570;
                    browser.MinWidth         = 580;
                    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                    browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
                    break;

                case "房源发布":    //房源发布
                    //MeetingNoticeWebPart Houseform = new MeetingNoticeWebPart(NoticeV.FormId);
                    HouseIssueWebPart Houseform    = new HouseIssueWebPart(source.FormId);
                    EntityBrowser     Housebrowser = new EntityBrowser(Houseform);
                    Housebrowser.MinHeight        = 570;
                    Housebrowser.MinWidth         = 580;
                    Housebrowser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                    Housebrowser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);

                    break;
                    //case "CompanyDoc"://公司公文
                    //    CompanyDocWebPart SendDocform = new CompanyDocWebPart(source.FormId);
                    //    System.Windows.Controls.Window.Show("公司发文", "", source.FormId, true, true, SendDocform, null);
                    //    //EntityBrowser SendDocbrowser = new EntityBrowser(SendDocform);
                    //    //SendDocbrowser.MinHeight = 850;
                    //    //SendDocbrowser.MinWidth = 650;
                    //    //SendDocbrowser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                    //    //SendDocbrowser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);

                    //break;
                }
                if (source.Formtype != "会议通知" && source.Formtype != "房源发布")
                {
                    CompanyDocWebPart SendDocform     = new CompanyDocWebPart(source.FormId);
                    System.Windows.Controls.Window wd = new System.Windows.Controls.Window();
                    wd.MinWidth     = 980;
                    wd.MinHeight    = 460;
                    wd.Content      = SendDocform;
                    wd.TitleContent = "公司发文";

                    wd.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true, false, source.FormId);
                }
                //switch (source.NEWSTYPEID)
                //{
                //    case "0": titel = "新闻"; break;
                //    case "1": titel = "动态"; break;
                //    case "2": titel = "公告"; break;
                //    case "3": titel = "通知"; break;
                //    default:
                //        break;
                //}
                //System.Windows.Controls.Window.Show(titel, "", source.NEWSID, true, true, newsview, null);
            }
            catch (Exception ex)
            {
                string aa = "";
            }
        }
예제 #5
0
파일: OAWebPart.xaml.cs 프로젝트: JuRogn/OA
        public static void ShowCompanyDoc(string FormId)
        {
            CompanyDocWebPart SendDocform = new CompanyDocWebPart(FormId);
            System.Windows.Controls.Window wd = new System.Windows.Controls.Window();
            wd.MinWidth = 980;
            wd.MinHeight = 460;
            wd.Content = SendDocform;
            wd.TitleContent = "公司发文";

            wd.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true, false, FormId);

 
        }
예제 #6
0
파일: OAWebPart.xaml.cs 프로젝트: JuRogn/OA
        private void HyperlinkButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                V_SystemNotice source = (sender as HyperlinkButton).DataContext as V_SystemNotice;
                //NewsShow newsview = new NewsShow() { ViewModel = source };
                
                switch (source.Formtype)
                {
                    case "会议通知"://会议通知
                        MeetingNoticeWebPart form = new MeetingNoticeWebPart(source.FormId);
                        EntityBrowser browser = new EntityBrowser(form);
                        browser.MinHeight = 570;
                        browser.MinWidth = 580;
                        browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                        browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
                        break;
                    case "房源发布"://房源发布
                        //MeetingNoticeWebPart Houseform = new MeetingNoticeWebPart(NoticeV.FormId);
                        HouseIssueWebPart Houseform = new HouseIssueWebPart(source.FormId);
                        EntityBrowser Housebrowser = new EntityBrowser(Houseform);
                        Housebrowser.MinHeight = 570;
                        Housebrowser.MinWidth = 580;
                        Housebrowser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                        Housebrowser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);

                        break;
                    //case "CompanyDoc"://公司公文
                    //    CompanyDocWebPart SendDocform = new CompanyDocWebPart(source.FormId);
                    //    System.Windows.Controls.Window.Show("公司发文", "", source.FormId, true, true, SendDocform, null);
                    //    //EntityBrowser SendDocbrowser = new EntityBrowser(SendDocform);
                    //    //SendDocbrowser.MinHeight = 850;
                    //    //SendDocbrowser.MinWidth = 650;
                    //    //SendDocbrowser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                    //    //SendDocbrowser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);

                    //break;
                }
                if (source.Formtype != "会议通知" && source.Formtype != "房源发布")
                {
                    CompanyDocWebPart SendDocform = new CompanyDocWebPart(source.FormId);
                    System.Windows.Controls.Window wd = new System.Windows.Controls.Window();
                    wd.MinWidth = 980;
                    wd.MinHeight = 460;
                    wd.Content = SendDocform;
                    wd.TitleContent = "公司发文";
                    
                    wd.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true, false, source.FormId);

                }
                //switch (source.NEWSTYPEID)
                //{
                //    case "0": titel = "新闻"; break;
                //    case "1": titel = "动态"; break;
                //    case "2": titel = "公告"; break;
                //    case "3": titel = "通知"; break;
                //    default:
                //        break;
                //}
                //System.Windows.Controls.Window.Show(titel, "", source.NEWSID, true, true, newsview, null);

            }
            catch (Exception ex)
            {
                string aa = "";
            }
        }