MyPrompt.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:22k
源码类别:

OA系统

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections.Generic;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. public partial class MyDeskTop_MyPrompt : System.Web.UI.Page
  12. {
  13.     /// <summary>
  14.     /// 待办的公文
  15.     /// </summary>
  16.     public string WaitForWorkStr = "";
  17.     /// <summary>
  18.     /// 新闻
  19.     /// </summary>
  20.     public string NewsStr = "";
  21.     /// <summary>
  22.     /// 公告
  23.     /// </summary>
  24.     public string ADStr = "";
  25.     /// <summary>
  26.     /// 邮件
  27.     /// </summary>
  28.     public string EmailStr = "";
  29.     /// <summary>
  30.     /// 调查问卷
  31.     /// </summary>
  32.     public string MyFileStr = "";
  33.     /// <summary>
  34.     /// 考勤记录
  35.     /// </summary>
  36.     public string MyAttenDanceStr = "";
  37.     /// <summary>
  38.     /// 提示消息
  39.     /// </summary>
  40.     public string MsgStr = "";
  41.     protected void Page_Load(object sender, EventArgs e)
  42.     {
  43.         RtWaitForWorkStr();
  44.         RtNewsStr();
  45.         RtADStr();
  46.         RtEmailStr();
  47.         RtMyFileStr();
  48.         RtMyFileStr();
  49.         RtMyAttenDanceStr();
  50.         RtMsgStr();
  51.     }
  52.     /// <summary>
  53.     /// 获取新闻内容
  54.     /// </summary>
  55.     public void RtWaitForWorkStr()
  56.     {
  57.         WaitForWorkStr = @" <tr>
  58.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  59.                             </td>
  60.                         <td class=""usertablerow2"">
  61.                             &nbsp;</td>
  62.                     </tr>
  63.                     <tr>
  64.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  65.                             </td>
  66.                         <td class=""usertablerow2"">
  67.                             &nbsp;</td>
  68.                     </tr>
  69.                     <tr>
  70.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  71.                             </td>
  72.                         <td class=""usertablerow1"" style=""height: 25px"">
  73.                         </td>
  74.                     </tr>
  75.                     <tr>
  76.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  77.                             </td>
  78.                         <td class=""usertablerow1"" style=""height: 25px"">
  79.                         </td>
  80.                     </tr>
  81.                     <tr>
  82.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  83.                             </td>
  84.                         <td class=""usertablerow2"" style=""height: 26px"">
  85.                             &nbsp;</td>
  86.                     </tr>";
  87.         List<Model.FlowRun> LRData = new BLL.FlowRun().GetPageList(5, 1, "ID", false, "YXZT='运行中' and XBR='" + SessionInclude.SessionId + "'");
  88.         if (LRData.Count > 0)
  89.         {
  90.             WaitForWorkStr = "";
  91.             foreach (Model.FlowRun LR in LRData)
  92.             {
  93.                 WaitForWorkStr += @"     <tr>
  94.                       <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 25px;"">
  95.                                <font color=""green"">办理中</font></td>
  96.                         <td class=""usertablerow2"" style=""height: 26px"">
  97.                             &nbsp;   <a href=""../Work/WorkEdit.aspx?id=" + LR.XBR + @""">" + EnumGet.GetFlowBaseTypeName(LR.BZID) + "</a>〖" + EnumGet.GetFlowBaseFormName(LR.BZID) + @"〗</td>
  98.                     </tr>";
  99.             }
  100.             int loop = 5 - LRData.Count;
  101.             for (int i = 0; i < loop; i++)
  102.             {
  103.                 WaitForWorkStr += @"     <tr>
  104.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  105.                             </td>
  106.                         <td class=""usertablerow2"" style=""height: 26px"">
  107.                             &nbsp;</td>
  108.                     </tr>";
  109.             }
  110.         }
  111.     }
  112.     /// <summary>
  113.     /// 获取新闻内容
  114.     /// </summary>
  115.     public void RtNewsStr()
  116.     {
  117.         NewsStr = @" <tr>
  118.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  119.                             </td>
  120.                         <td class=""usertablerow2"">
  121.                             &nbsp;</td>
  122.                     </tr>
  123.                     <tr>
  124.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  125.                             </td>
  126.                         <td class=""usertablerow2"">
  127.                             &nbsp;</td>
  128.                     </tr>
  129.                     <tr>
  130.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  131.                             </td>
  132.                         <td class=""usertablerow1"" style=""height: 25px"">
  133.                         </td>
  134.                     </tr>
  135.                     <tr>
  136.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  137.                             </td>
  138.                         <td class=""usertablerow1"" style=""height: 25px"">
  139.                         </td>
  140.                     </tr>
  141.                     <tr>
  142.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  143.                             </td>
  144.                         <td class=""usertablerow2"" style=""height: 26px"">
  145.                             &nbsp;</td>
  146.                     </tr>";
  147.         List<Model.INFONews> LRData = new BLL.INFONews().GetPageList(5, 1, "ID", false, "");
  148.         if (LRData.Count > 0)
  149.         {
  150.             NewsStr = "";
  151.             foreach (Model.INFONews LR in LRData)
  152.             {
  153.                 NewsStr += @"     <tr>
  154.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  155.                             " + LR.SJ.ToString("yyyy-MM-dd") + @"</td>
  156.                         <td class=""usertablerow2"" style=""height: 26px"">
  157.                             &nbsp;<a href='../InFos/InfoView.aspx?id=" + LR.ID + @"'>" + LR.ZT + @"</a></td>
  158.                     </tr>";
  159.             }
  160.             int loop = 5 - LRData.Count;
  161.             for (int i = 0; i < loop; i++)
  162.             {
  163.                 NewsStr += @"     <tr>
  164.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  165.                             </td>
  166.                         <td class=""usertablerow2"" style=""height: 26px"">
  167.                             &nbsp;</td>
  168.                     </tr>";
  169.             }
  170.         }
  171.   
  172.     }
  173.     /// <summary>
  174.     /// 获取公告内容
  175.     /// </summary>
  176.     public void RtADStr()
  177.     {
  178.         ADStr = @" <tr>
  179.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  180.                             </td>
  181.                         <td class=""usertablerow2"">
  182.                             &nbsp;</td>
  183.                     </tr>
  184.                     <tr>
  185.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  186.                             </td>
  187.                         <td class=""usertablerow2"">
  188.                             &nbsp;</td>
  189.                     </tr>
  190.                     <tr>
  191.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  192.                             </td>
  193.                         <td class=""usertablerow1"" style=""height: 25px"">
  194.                         </td>
  195.                     </tr>
  196.                     <tr>
  197.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  198.                             </td>
  199.                         <td class=""usertablerow1"" style=""height: 25px"">
  200.                         </td>
  201.                     </tr>
  202.                     <tr>
  203.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  204.                             </td>
  205.                         <td class=""usertablerow2"" style=""height: 26px"">
  206.                             &nbsp;</td>
  207.                     </tr>";
  208.         List<Model.INFOADNews> LRData =new BLL.INFOADNews().GetPageList(5, 1, "ID", false, "");
  209.         if (LRData.Count > 0)
  210.         {
  211.             ADStr = "";
  212.             foreach (Model.INFOADNews LR in LRData)
  213.             {
  214.                 ADStr += @"     <tr>
  215.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  216.                             " + LR.SJ.ToString("yyyy-MM-dd") + @"</td>
  217.                         <td class=""usertablerow2"" style=""height: 26px"">
  218.                             &nbsp;<a href='../InFos/AdInfoView.aspx?id=" + LR.ID + @"'>" + LR.ZT + @"</a></td>
  219.                     </tr>";
  220.             }
  221.             int loop = 5 - LRData.Count;
  222.             for (int i = 0; i < loop; i++)
  223.             {
  224.                 ADStr += @"     <tr>
  225.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  226.                             </td>
  227.                         <td class=""usertablerow2"" style=""height: 26px"">
  228.                             &nbsp;</td>
  229.                     </tr>";
  230.             }
  231.         }
  232.     }
  233.     /// <summary>
  234.     /// 获取邮件内容
  235.     /// </summary>
  236.     public void RtEmailStr()
  237.     {
  238.         EmailStr = @" <tr>
  239.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  240.                             </td>
  241.                         <td class=""usertablerow2"">
  242.                             &nbsp;</td>
  243.                     </tr>
  244.                     <tr>
  245.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  246.                             </td>
  247.                         <td class=""usertablerow2"">
  248.                             &nbsp;</td>
  249.                     </tr>
  250.                     <tr>
  251.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  252.                             </td>
  253.                         <td class=""usertablerow1"" style=""height: 25px"">
  254.                         </td>
  255.                     </tr>
  256.                     <tr>
  257.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  258.                             </td>
  259.                         <td class=""usertablerow1"" style=""height: 25px"">
  260.                         </td>
  261.                     </tr>
  262.                     <tr>
  263.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  264.                             </td>
  265.                         <td class=""usertablerow2"" style=""height: 26px"">
  266.                             &nbsp;</td>
  267.                     </tr>";
  268.         List<Model.Mails> LRData = new BLL.Mails().GetPageList(5, 1, "SenderDate", false, "ToAddress='" + SessionInclude.SessionId + "' and FolderID=3");
  269.         if (LRData.Count > 0)
  270.         {
  271.             EmailStr = "";
  272.             foreach (Model.Mails LR in LRData)
  273.             {
  274.                 EmailStr += @"     <tr>
  275.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  276.                             " + LR.SenderDate.ToString("yyyy-MM-dd") + @"</td>
  277.                         <td class=""usertablerow2"" style=""height: 26px"">
  278.                             &nbsp;<a href='../EmailSystem/Reader.aspx?MailID=" + LR.MailID + @"&FolderID=3'>" + LR.Title + @"</a></td>
  279.                     </tr>";
  280.             }
  281.             int loop = 5 - LRData.Count;
  282.             for (int i = 0; i < loop; i++)
  283.             {
  284.                 EmailStr += @"     <tr>
  285.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  286.                             </td>
  287.                         <td class=""usertablerow2"" style=""height: 26px"">
  288.                             &nbsp;</td>
  289.                     </tr>";
  290.             }
  291.         }
  292.     }
  293.     /// <summary>
  294.     /// 调查问卷
  295.     /// </summary>
  296.     public void RtMyFileStr()
  297.     {
  298.         MyFileStr = @" <tr>
  299.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  300.                             </td>
  301.                         <td class=""usertablerow2"">
  302.                             &nbsp;</td>
  303.                     </tr>
  304.                     <tr>
  305.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  306.                             </td>
  307.                         <td class=""usertablerow2"">
  308.                             &nbsp;</td>
  309.                     </tr>
  310.                     <tr>
  311.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  312.                             </td>
  313.                         <td class=""usertablerow1"" style=""height: 25px"">
  314.                         </td>
  315.                     </tr>
  316.                     <tr>
  317.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  318.                             </td>
  319.                         <td class=""usertablerow1"" style=""height: 25px"">
  320.                         </td>
  321.                     </tr>
  322.                     <tr>
  323.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  324.                             </td>
  325.                         <td class=""usertablerow2"" style=""height: 26px"">
  326.                             &nbsp;</td>
  327.                     </tr>";
  328.         List<Model.Asks> LRData = new BLL.Asks().GetPageList(5, 1, "ID", false, "");
  329.         if (LRData.Count > 0)
  330.         {
  331.             MyFileStr = "";
  332.             foreach (Model.Asks LR in LRData)
  333.             {
  334.                 MyFileStr += @"     <tr>
  335.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  336.                             " + LR.DCSJ.ToString("yyyy-MM-dd") + @"</td>
  337.                         <td class=""usertablerow2"" style=""height: 26px"">
  338.                             &nbsp;<a href='../InFos/AskView.aspx?id=" + LR.ID + @"'>" + LR.DCNR + @"</a></td>
  339.                     </tr>";
  340.             }
  341.             int loop = 5 - LRData.Count;
  342.             for (int i = 0; i < loop; i++)
  343.             {
  344.                 MyFileStr += @"     <tr>
  345.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  346.                             </td>
  347.                         <td class=""usertablerow2"" style=""height: 26px"">
  348.                             &nbsp;</td>
  349.                     </tr>";
  350.             }
  351.         }
  352.     }
  353.     /// <summary>
  354.     /// 获取考勤内容
  355.     /// </summary>
  356.     public void RtMyAttenDanceStr()
  357.     {
  358.         MyAttenDanceStr = @" <tr>
  359.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  360.                             </td>
  361.                         <td class=""usertablerow2"">
  362.                             &nbsp;</td>
  363.                     </tr>
  364.                     <tr>
  365.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  366.                             </td>
  367.                         <td class=""usertablerow2"">
  368.                             &nbsp;</td>
  369.                     </tr>
  370.                     <tr>
  371.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  372.                             </td>
  373.                         <td class=""usertablerow1"" style=""height: 25px"">
  374.                         </td>
  375.                     </tr>
  376.                     <tr>
  377.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  378.                             </td>
  379.                         <td class=""usertablerow1"" style=""height: 25px"">
  380.                         </td>
  381.                     </tr>
  382.                     <tr>
  383.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  384.                             </td>
  385.                         <td class=""usertablerow2"" style=""height: 26px"">
  386.                             &nbsp;</td>
  387.                     </tr>";
  388.         List<Model.AttenDance> LRData = new BLL.AttenDance().GetPageList(5, 1, "ID", false, "");
  389.         if (LRData.Count > 0)
  390.         {
  391.             MyAttenDanceStr = "";
  392.             foreach (Model.AttenDance LR in LRData)
  393.             {
  394.                 MyAttenDanceStr += @"     <tr>
  395.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  396.                             " + LR.KQLX + @"</td>
  397.                         <td class=""usertablerow2"" style=""height: 26px"">
  398.                             &nbsp;" + LR.DJSJ.ToString("yyyy-MM-dd HH:mm:ss")+ @"</td>
  399.                     </tr>";
  400.             }
  401.             int loop = 5 - LRData.Count;
  402.             for (int i = 0; i < loop; i++)
  403.             {
  404.                 MyAttenDanceStr += @"     <tr>
  405.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  406.                             </td>
  407.                         <td class=""usertablerow2"" style=""height: 26px"">
  408.                             &nbsp;</td>
  409.                     </tr>";
  410.             }
  411.         }
  412.     }
  413.     /// <summary>
  414.     /// 短信息
  415.     /// </summary>
  416.     public void RtMsgStr()
  417.     {
  418.         MsgStr = @" <tr>
  419.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  420.                             </td>
  421.                         <td class=""usertablerow2"">
  422.                             &nbsp;</td>
  423.                     </tr>
  424.                     <tr>
  425.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  426.                             </td>
  427.                         <td class=""usertablerow2"">
  428.                             &nbsp;</td>
  429.                     </tr>
  430.                     <tr>
  431.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  432.                             </td>
  433.                         <td class=""usertablerow1"" style=""height: 25px"">
  434.                         </td>
  435.                     </tr>
  436.                     <tr>
  437.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  438.                             </td>
  439.                         <td class=""usertablerow1"" style=""height: 25px"">
  440.                         </td>
  441.                     </tr>
  442.                     <tr>
  443.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  444.                             </td>
  445.                         <td class=""usertablerow2"" style=""height: 26px"">
  446.                             &nbsp;</td>
  447.                     </tr><tr>
  448.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  449.                             </td>
  450.                         <td class=""usertablerow2"">
  451.                             &nbsp;</td>
  452.                     </tr>
  453.                     <tr>
  454.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px"">
  455.                             </td>
  456.                         <td class=""usertablerow2"">
  457.                             &nbsp;</td>
  458.                     </tr>
  459.                     <tr>
  460.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  461.                             </td>
  462.                         <td class=""usertablerow1"" style=""height: 25px"">
  463.                         </td>
  464.                     </tr>
  465.      <tr>
  466.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  467.                             </td>
  468.                         <td class=""usertablerow1"" style=""height: 25px"">
  469.                         </td>
  470.                     </tr>
  471.                     <tr>
  472.                         <td class=""usertablerow1"" style=""height: 25px; width: 82px;"" align=""right"">
  473.                             </td>
  474.                         <td class=""usertablerow1"" style=""height: 25px"">
  475.                         </td>
  476.                     </tr>
  477.                     <tr>
  478.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  479.                             </td>
  480.                         <td class=""usertablerow2"" style=""height: 26px"">
  481.                             &nbsp;</td>
  482.                     </tr>";
  483.         List<Model.Sms> LRData = new BLL.Sms().GetPageList(11, 1, "ID", false, "ToId='" + SessionInclude.SessionId + "' and type=0");
  484.         if (LRData.Count > 0)
  485.         {
  486.             MsgStr = "";
  487.             foreach (Model.Sms LR in LRData)
  488.             {
  489.                 MsgStr += @"     <tr>
  490.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  491.                             " + LR.SendTime.ToString("yyyy-MM-dd") + @"</td>
  492.                         <td class=""usertablerow2"" style=""height: 26px"">
  493.                             &nbsp;<a href='../SMS/SMSManager.aspx'>" + LR.Content + @"</a></td>
  494.                     </tr>";
  495.             }
  496.             int loop = 11 - LRData.Count;
  497.             for (int i = 0; i < loop; i++)
  498.             {
  499.                 MsgStr += @"     <tr>
  500.                         <td class=""usertablerow2"" align=""right"" style=""width: 82px; height: 26px;"">
  501.                             </td>
  502.                         <td class=""usertablerow2"" style=""height: 26px"">
  503.                             &nbsp;</td>
  504.                     </tr>";
  505.             }
  506.         }
  507.     }
  508. }