Beispiel #1
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] + ",";
                        }
                    }
                }
            }
        }
    }