Пример #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
 public void CloseParent(string msg)
 {
     try
     {
         CommonFunction.ShowErrorMessage(msg);
         System.Windows.Controls.Window winParent = this.Parent as System.Windows.Controls.Window;
         if (winParent != null)
         {
             winParent.Close();
         }
     }
     catch
     {
         this.Content = new TextBlock {
             Text = msg
         };
     }
 }
Пример #3
0
        private void OtherAction(DataResult result)
        {
            isSelect = false;
            this.selectDataresult = result;
            NextStateCode = result.AppState;

            System.Windows.Controls.Window winSelector = new System.Windows.Controls.Window();
            winSelector.Unloaded += new RoutedEventHandler(winSelector_Unloaded);
            winSelector.Height = 250;
            winSelector.Width = 400;
            winSelector.TitleContent = "确认审核人";
            Grid gridSelector = new Grid();
            RowDefinition r1 = new RowDefinition();
            RowDefinition r2 = new RowDefinition();
            RowDefinition r3 = new RowDefinition();
            r1.Height = new GridLength(20, GridUnitType.Auto);
            r2.Height = new GridLength(1, GridUnitType.Star);
            r3.Height = new GridLength(20, GridUnitType.Auto);
            gridSelector.RowDefinitions.Add(r1);
            gridSelector.RowDefinitions.Add(r2);
            gridSelector.RowDefinitions.Add(r3);


            TextBlock tb = new TextBlock();
            tb.Text = "不能确定下一审核人, 请重新选择一个审核人,并按确认提交";
            tb.SetValue(Grid.RowProperty, 0);

            ScrollViewer scrollp = new ScrollViewer();
            scrollp.SetValue(Grid.RowProperty, 1);

            StackPanel sp = new StackPanel();            
            sp.Margin = new Thickness(15, 5, 0, 0);
            sp.Orientation = Orientation.Vertical;
          

            for (int i = 0; i < result.UserInfo.Count; i++)
            {
                RadioButton rbtn = new RadioButton();
                //rbtn.Content = result.UserInfo[i].UserName;
                rbtn.Content = result.UserInfo[i].UserName + "(" + result.UserInfo[i].CompanyName + "->" + result.UserInfo[i].DepartmentName + "->" + result.UserInfo[i].PostName + ")";

                rbtn.DataContext = result.UserInfo[i];
                rbtn.GroupName = "User";
                sp.Children.Add(rbtn);
            }
            scrollp.Content = sp;

            Button btnOK = new Button();
            btnOK.Height = 26;
            btnOK.Width = 80;
            btnOK.Content = Utility.GetResourceStr("lblConfirm");
            btnOK.HorizontalAlignment = HorizontalAlignment.Right;
            btnOK.Margin = new Thickness(0, 0, 5, 10);
            btnOK.SetValue(Grid.RowProperty, 2);

            btnOK.Click += (e, o) =>
            {
                this.isSelect = true;
                UIElement element = sp.Children.FirstOrDefault(item =>
                {
                    RadioButton rb = item as RadioButton;
                    return rb.IsChecked == true;
                });
                if (element == null)
                {
                    this.isSelect = false;
                    ComfirmWindow.ConfirmationBox("警告", "请先选择一个审核人!", Utility.GetResourceStr("CONFIRMBUTTON"));

                    //MessageBox.Show("请先选择一个审核人");
                }
                else
                {
                    RadioButton rbSelect = element as RadioButton;
                    UserInfo otherUser = rbSelect.DataContext as UserInfo;
                    NextCompanyID = otherUser.CompanyID;
                    NextDepartmentID = otherUser.DepartmentID;
                    NextPostID = otherUser.PostID;
                    NextUserID = otherUser.UserID;
                    NextUserName = otherUser.UserName;

                    InnerHandIn(currAuditOperation, curAuditAction);
                    winSelector.Close();
                }
            };
            ContentControl parent = new ContentControl();
            parent.Content = gridSelector;

            winSelector.Content = parent;
            gridSelector.Children.Add(tb);
            gridSelector.Children.Add(scrollp);
            gridSelector.Children.Add(btnOK);
            FrameworkElement fe = SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot;

            // Window.Show("", "", Guid.NewGuid().ToString(), true, false, parent, null);
            winSelector.Show<string>(DialogMode.Default, fe, "", (resulta) => { });

        }
Пример #4
0
        private void CounterAction(DataResult result)
        {
            this.isSelect = false;
            this.selectDataresult = result;
            NextStateCode = result.AppState;
            List<Rule_UserInfoViewModel> listviewmodel = new List<Rule_UserInfoViewModel>();
            result.DictCounterUser.Keys.ForEach(key =>
            {
                Rule_UserInfoViewModel vm = new Rule_UserInfoViewModel(key, result.DictCounterUser[key].ToList());
                listviewmodel.Add(vm);
            });
            //this.ListCountersign.ItemsSource = listviewmodel;
            //AuditEventArgs args = new AuditEventArgs(AuditEventArgs.AuditResult.Error, result);
            //args.StartDate = this.AuditEntity.StartDate;
            //args.EndDate = System.DateTime.Now;
            //OnAuditCompleted(this, args);
            //this.BindingData();
            DataTemplate CountersignTemplate = this.Resources["CountersignTemplate"] as DataTemplate;
            Style listboxStyle = this.Resources["ListBoxItemStyle1"] as Style;
            System.Windows.Controls.Window winSelector = new System.Windows.Controls.Window();
            winSelector.Unloaded += new RoutedEventHandler(winSelector_Unloaded);
            winSelector.MinHeight = 400;
            winSelector.Width = 400;
            //winSelector.Resources.Add("UserInfoTemplate", this.Resources["UserInfoTemplate"]);
            //winSelector.Resources.Add("ListBoxItemStyle1", this.Resources["ListBoxItemStyle1"]);
            //winSelector.Resources.Add("CountersignTemplate", this.Resources["CountersignTemplate"]);

            //winSelector.Width = 400;
            winSelector.TitleContent = "确认审核人";

            Grid gridSelector = new Grid();
            RowDefinition r1 = new RowDefinition();
            RowDefinition r2 = new RowDefinition();
            RowDefinition r3 = new RowDefinition();


            r1.Height = new GridLength(50, GridUnitType.Auto);
            r2.Height = new GridLength(30, GridUnitType.Auto);
            r3.Height = new GridLength(50, GridUnitType.Auto);
            gridSelector.RowDefinitions.Add(r1);
            gridSelector.RowDefinitions.Add(r2);
            gridSelector.RowDefinitions.Add(r3);
            TextBlock tb = new TextBlock();
            tb.Height = 26;
            tb.VerticalAlignment = System.Windows.VerticalAlignment.Center;
            if (result.CountersignType == "0")
            {
                tb.Text = "请为每个角色至少选择一人,并按确认提交。";
            }
            else
            {
                tb.Text = "请至少选择一人,并按确认提交。";
            }
            tb.SetValue(Grid.RowProperty, 0);

            ScrollViewer sp = new ScrollViewer();
            ListBox listboxCountersign = new ListBox();

            listboxCountersign.ItemTemplate = CountersignTemplate;
            listboxCountersign.ItemContainerStyle = listboxStyle;
            listboxCountersign.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Stretch;
            listboxCountersign.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            sp.SetValue(Grid.RowProperty, 1);
            listviewmodel.ForEach(item =>
            {
                item.ListUserInfo.ForEach(ent =>
                {
                    ent.UserInfo.CompanyName = ent.UserInfo.UserName + "(" + ent.UserInfo.CompanyName + "->" + ent.UserInfo.DepartmentName + "->" + ent.UserInfo.PostName + ")";

                });
            });
            listboxCountersign.ItemsSource = listviewmodel;

            sp.Height = 300;
            sp.Width = 400;
            //listboxCountersign.
          //listboxCountersign.ScrollIntoView(listviewmodel);
          listboxCountersign.UpdateLayout();
          sp.Content=listboxCountersign;

            Button btnOK = new Button();
            btnOK.Content = "确认";
            btnOK.Margin = new Thickness(0, 0, 5, 10);
            btnOK.VerticalAlignment = System.Windows.VerticalAlignment.Center;
            btnOK.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
            btnOK.Width = 80;
            btnOK.Height = 26;
            btnOK.SetValue(Grid.RowProperty, 2);

            btnOK.Click += (o, e) =>
            {
                this.isSelect = true;
                #region

                #region Check
                this.DictCounterUser = new Dictionary<Role_UserType, ObservableCollection<UserInfo>>();
                if (result.CountersignType == "0")
                {
                    foreach (var viewModel in listviewmodel)
                    {
                        bool bUser = false;
                        ObservableCollection<UserInfo> listuserinfo = new ObservableCollection<UserInfo>();
                        viewModel.ListUserInfo.ForEach(user =>
                        {
                            if (user.IsCheck)
                            {
                                bUser = true;
                                listuserinfo.Add(user.UserInfo);
                            }
                        });
                        if (!bUser)
                        {
                            this.isSelect = false;
                            ComfirmWindow.ConfirmationBox("警告", "请选择角色" + viewModel.Role_UserType.Remark + "的审核人", Utility.GetResourceStr("CONFIRMBUTTON"));

                            //MessageBox.Show("请选择角色" + viewModel.Role_UserType.RoleNameName + "的审核人");
                            return;
                        }
                        this.DictCounterUser[viewModel.Role_UserType] = listuserinfo;
                    }

                }
                else
                {
                    bool bUser = false;
                    foreach (var viewModel in listviewmodel)
                    {
                        ObservableCollection<UserInfo> listuserinfo = new ObservableCollection<UserInfo>();
                        viewModel.ListUserInfo.ForEach(user =>
                        {
                            if (user.IsCheck)
                            {
                                bUser = true;
                                listuserinfo.Add(user.UserInfo);
                            }
                        });
                        this.DictCounterUser[viewModel.Role_UserType] = listuserinfo;
                    }
                    if (!bUser)
                    {
                        this.isSelect = false;
                        ComfirmWindow.ConfirmationBox("警告", "至少选择一个审核人", Utility.GetResourceStr("CONFIRMBUTTON"));
                        //MessageBox.Show("至少选择一个审核人");
                        return;
                    }
                }
                #endregion

                InnerHandIn(currAuditOperation, curAuditAction);


                winSelector.Close();
                #endregion
            };


            ContentControl parent = new ContentControl();
         
            parent.Content = gridSelector;
            winSelector.Content = parent;
            gridSelector.Children.Add(tb);
            gridSelector.Children.Add(sp);
            gridSelector.Children.Add(btnOK);

            FrameworkElement fe = SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot;

            // Window.Show("", "", Guid.NewGuid().ToString(), true, false, parent, null);
            winSelector.Show<string>(DialogMode.Default, fe, "", (resulta) => { });


        }
Пример #5
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);
            }
        }
Пример #6
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;
            //}
        }
Пример #7
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;
            //}
            

        }
Пример #8
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 = "";
            }
        }
Пример #9
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);

 
        }
Пример #10
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 = "";
            }
        }