Exemplo n.º 1
0
    private void RestoreMail(int iMailID, string strSenderCode)
    {
        MailManage mailManage = new MailManage();
        DataTable  oneMail    = mailManage.GetOneMail(iMailID, strSenderCode);

        if (oneMail.Rows.Count > 0)
        {
            int num = int.Parse(oneMail.Rows[0]["i_SysID"].ToString());
            if (num != this._iSysID)
            {
                SysManageDb sysManageDb = new SysManageDb();
                DataTable   dataTable   = sysManageDb.QuerySys(num);
                string      str         = dataTable.Rows[0]["v_SysName"].ToString();
                dataTable.Rows[0]["v_Sys"].ToString();
                this.LabSender.Text = oneMail.Rows[0]["v_fxrxm"].ToString() + "[来自:" + str + "]";
            }
            else
            {
                this.LabSender.Text = oneMail.Rows[0]["v_fxrxm"].ToString();
            }
            this.LabConsignee.Text = oneMail.Rows[0]["v_jsrxm"].ToString();
            string strUserCode = oneMail.Rows[0]["v_jsrdm"].ToString();
            this.LabTitle.Text    = oneMail.Rows[0]["v_zt"].ToString();
            this.LabDateTime.Text = oneMail.Rows[0]["dtm_sjsj"].ToString();
            string text = oneMail.Rows[0]["txt_zw"].ToString();
            text = text.Replace("\r\n", "<BR>");
            text = text.Replace(" ", "&nbsp;");
            text = "&nbsp;&nbsp;&nbsp;&nbsp;" + text;
            this.contentBlock.InnerHtml = text;
            DataTable mailAnnex = mailManage.GetMailAnnex(iMailID);
            if (mailAnnex.Rows.Count > 0)
            {
                for (int i = 0; i < mailAnnex.Rows.Count; i++)
                {
                    string[] array = mailAnnex.Rows[i]["v_Lmc"].ToString().Split(new char[]
                    {
                        '-'
                    });
                    HtmlGenericControl expr_24F  = this.annexBlock;
                    string             innerHtml = expr_24F.InnerHtml;
                    expr_24F.InnerHtml = string.Concat(new string[]
                    {
                        innerHtml,
                        "<LI><A href=\"#\" onclick=\"javascript:download('",
                        mailAnnex.Rows[i]["v_fjlj"].ToString(),
                        mailAnnex.Rows[i]["v_Lmc"].ToString(),
                        "','",
                        array[1].ToString(),
                        "');\">",
                        array[1].ToString(),
                        "</A>"
                    });
                }
            }
            mailManage.ReadMail(iMailID, strUserCode);
        }
    }
Exemplo n.º 2
0
    private void RestoreMail(int iMailID, string strSenderCode)
    {
        MailManage mailManage = new MailManage();
        DataTable  oneMail    = mailManage.GetOneMail(iMailID, strSenderCode);

        if (oneMail.Rows.Count > 0)
        {
            int num = int.Parse(oneMail.Rows[0]["i_SysID"].ToString());
            if (num != this._iSysID)
            {
                SysManageDb sysManageDb = new SysManageDb();
                DataTable   dataTable   = sysManageDb.QuerySys(num);
                dataTable.Rows[0]["v_Sys"].ToString();
                string str = dataTable.Rows[0]["v_SysName"].ToString();
                this.LabSender.Text = oneMail.Rows[0]["v_fxrxm"].ToString() + "[来自:" + str + "]";
            }
            else
            {
                this.LabSender.Text = oneMail.Rows[0]["v_fxrxm"].ToString();
            }
            this.LabConsignee.Text = this.sub(oneMail.Rows[0]["v_SJR"].ToString());
            this.LbCSR.Text        = this.sub(oneMail.Rows[0]["V_CSR"].ToString());
            this.LabTitle.Text     = oneMail.Rows[0]["v_zt"].ToString();
            this.LabDateTime.Text  = oneMail.Rows[0]["dtm_sjsj"].ToString();
            this.LblCon.Text       = oneMail.Rows[0]["txt_zw"].ToString();
            DataTable mailAnnex = mailManage.GetMailAnnex(iMailID);
            int       num2      = 20 * mailAnnex.Rows.Count;
            this.tr_fj.Attributes["height"] = num2.ToString() + "px";
            if (mailAnnex.Rows.Count > 0)
            {
                for (int i = 0; i < mailAnnex.Rows.Count; i++)
                {
                    string[] array = mailAnnex.Rows[i]["v_Lmc"].ToString().Split(new char[]
                    {
                        '-'
                    });
                    HtmlGenericControl expr_25A  = this.annexBlock;
                    string             innerHtml = expr_25A.InnerHtml;
                    expr_25A.InnerHtml = string.Concat(new string[]
                    {
                        innerHtml,
                        "<a href='",
                        mailAnnex.Rows[i]["v_fjlj"].ToString(),
                        mailAnnex.Rows[i]["v_Lmc"].ToString(),
                        "' target=_blank>",
                        array[1].ToString(),
                        "</a> "
                    });
                }
            }
            mailManage.ReadMail(iMailID, strSenderCode);
        }
    }
Exemplo n.º 3
0
    private void GetMail(int iMailID)
    {
        MailManage mailManage = new MailManage();

        if (this._strOperType == "z" && !mailManage.ReEditAnnex(iMailID, this._strSenderCode))
        {
            this.RegisterClientScriptBlock("warn", "<SCRIPT language=\"JavaScript\">alert('还原邮件失败,请刷新试试!');</SCRIPT>");
            return;
        }
        DataTable oneMail = mailManage.GetOneMail(iMailID, this._strHeaderCode);

        if (oneMail.Rows.Count > 0)
        {
            if (this._strOperType == "r")
            {
                this.TBoxTitle.Text = "[回复]" + oneMail.Rows[0]["v_zt"].ToString();
            }
            else
            {
                if (this._strOperType == "z")
                {
                    this.TBoxTitle.Text = "[转发]" + oneMail.Rows[0]["v_zt"].ToString();
                }
                else
                {
                    this.TBoxTitle.Text = oneMail.Rows[0]["v_zt"].ToString();
                }
            }
            this.TBoxContent.Text = oneMail.Rows[0]["txt_zw"].ToString();
            if (this._strOperType == "z" && int.Parse(oneMail.Rows[0]["i_fjsl"].ToString()) > 0)
            {
                DataTable mailAnnex = mailManage.GetMailAnnex(iMailID);
                foreach (DataRow dataRow in mailAnnex.Rows)
                {
                    TextBox expr_18D = this.TBoxAnnex;
                    expr_18D.Text = expr_18D.Text + dataRow["v_Lmc"].ToString() + ",";
                }
            }
            if (oneMail.Rows[0]["i_MailType"].ToString() == "0")
            {
                this.RBtnMailType.Items[0].Selected = true;
            }
            else
            {
                this.RBtnMailType.Items[1].Selected = true;
            }
            this.Session["System"]    = oneMail.Rows[0]["i_SysID"].ToString() + ",";
            this.Session["HumanCode"] = oneMail.Rows[0]["i_SysID"].ToString() + ":" + oneMail.Rows[0]["v_fxrdm"].ToString() + "!";
            this.Session["HumanName"] = oneMail.Rows[0]["v_fxrxm"].ToString() + ",";
            this.TBoxConsignee.Text   = this.Session["HumanName"].ToString();
        }
    }
Exemplo n.º 4
0
    private void RestoreMail(int iMailID, string strSenderCode)
    {
        MailManage mailManage = new MailManage();
        DataTable  oneMail    = mailManage.GetOneMail(iMailID, strSenderCode);

        if (oneMail.Rows.Count > 0)
        {
            int.Parse(oneMail.Rows[0]["i_SysID"].ToString());
            this.LabSender.Text    = oneMail.Rows[0]["v_fxrxm"].ToString();
            this.LabConsignee.Text = this.sub(oneMail.Rows[0]["v_SJR"].ToString());
            this.LbCSR.Text        = this.sub(oneMail.Rows[0]["V_CSR"].ToString());
            this.LabTitle.Text     = oneMail.Rows[0]["v_zt"].ToString();
            this.LabDateTime.Text  = oneMail.Rows[0]["dtm_sjsj"].ToString();
            this.LblCon.Text       = oneMail.Rows[0]["txt_zw"].ToString();
            DataTable mailAnnex = mailManage.GetMailAnnex(iMailID);
            int       num       = 20 * mailAnnex.Rows.Count;
            this.tr_fj.Attributes["height"] = num.ToString() + "px";
            if (mailAnnex.Rows.Count > 0)
            {
                for (int i = 0; i < mailAnnex.Rows.Count; i++)
                {
                    string[] array = mailAnnex.Rows[i]["v_Lmc"].ToString().Split(new char[]
                    {
                        '-'
                    });
                    HtmlGenericControl expr_1C0  = this.annexBlock;
                    string             innerHtml = expr_1C0.InnerHtml;
                    expr_1C0.InnerHtml = string.Concat(new string[]
                    {
                        innerHtml,
                        "<LI><A href=\"#\" onclick=\"javascript:download('",
                        mailAnnex.Rows[i]["v_fjlj"].ToString(),
                        mailAnnex.Rows[i]["v_Lmc"].ToString(),
                        "','",
                        array[1].ToString(),
                        "');\">",
                        array[1].ToString(),
                        "</A>"
                    });
                }
            }
        }
    }
Exemplo n.º 5
0
    private void GetDraft(int iMailID)
    {
        MailManage mailManage = new MailManage();

        if (mailManage.ReEditAnnex(iMailID, this._strSenderCode))
        {
            DataTable oneMail = mailManage.GetOneMail(iMailID, this._strSenderCode);
            if (oneMail.Rows.Count > 0)
            {
                this.TBoxTitle.Text   = oneMail.Rows[0]["v_zt"].ToString();
                this.TBoxContent.Text = oneMail.Rows[0]["txt_zw"].ToString();
                if (int.Parse(oneMail.Rows[0]["i_fjsl"].ToString()) > 0)
                {
                    DataTable mailAnnex = mailManage.GetMailAnnex(iMailID);
                    foreach (DataRow dataRow in mailAnnex.Rows)
                    {
                        TextBox expr_D0 = this.TBoxAnnex;
                        expr_D0.Text = expr_D0.Text + dataRow["v_Lmc"].ToString() + ",";
                    }
                }
                DataTable consignee = mailManage.GetConsignee(iMailID);
                if (consignee.Rows.Count > 0)
                {
                    this.Session["HumanCode"] = consignee.Rows[0]["v_jsrdm"].ToString();
                    this.Session["HumanName"] = consignee.Rows[0]["v_jsrxm"].ToString();
                    this.TBoxConsignee.Text   = this.Session["HumanName"].ToString();
                    string   text  = this.Session["HumanCode"].ToString();
                    string[] array = text.Split(new char[]
                    {
                        '!'
                    });
                    string text2 = "";
                    for (int i = 0; i < array.Length - 1; i++)
                    {
                        text2 = text2 + array[i].Split(new char[]
                        {
                            ':'
                        })[0].ToString() + ":";
                    }
                    string[] array2 = text2.Split(new char[]
                    {
                        ':'
                    });
                    for (int j = 0; j < array2.Length; j++)
                    {
                        int num = j + 1;
                        while (num < array2.Length && !(array2[j].ToString() == ""))
                        {
                            if (array2[j].ToString() == array2[num].ToString())
                            {
                                array2[num] = "";
                            }
                            num++;
                        }
                    }
                    for (int k = 0; k < array2.Length; k++)
                    {
                        if (array2[k].ToString() != "")
                        {
                            HttpSessionState session;
                            (session = this.Session)["System"] = session["System"] + array2[k] + ",";
                        }
                    }
                }
            }
        }
    }