Example #1
0
    protected void BtnDelY_Click(object sender, EventArgs e)
    {
        int        num        = 0;
        MailManage mailManage = new MailManage();

        foreach (DataGridItem dataGridItem in this.DGridDraft.Items)
        {
            CheckBox checkBox = (CheckBox)dataGridItem.FindControl("cbSelSingle");
            if (checkBox.Checked)
            {
                int iMailID = int.Parse(this.DGridDraft.DataKeys[dataGridItem.ItemIndex].ToString());
                if (!mailManage.DelMail(iMailID, this._strSenderCode))
                {
                    this.RegisterClientScriptBlock("warn", "<SCRIPT language=\"JavaScript\">alert('在移动部分邮件过程中出错!');</SCRIPT>");
                }
            }
        }
        if (num > 0)
        {
            if (this.DGridDraft.Items.Count > 0)
            {
                this.RegisterClientScriptBlock("Success", "<SCRIPT language=\"JavaScript\">alert('操作成功!');window.location.href=window.location.href;</SCRIPT>");
            }
        }
        else
        {
            this.RegisterClientScriptBlock("Success", "<SCRIPT language=\"JavaScript\">alert('请选择要删除的项!');window.location.href=window.location.href;</SCRIPT>");
        }
        this.DGridDraft_Bind(this.DGridDraft.CurrentPageIndex);
    }
Example #2
0
    protected void BtnDelY_Click(object sender, EventArgs e)
    {
        MailManage mailManage = new MailManage();

        if (mailManage.DelMail(this._iMailID, this._strHeaderCode))
        {
            base.Response.Redirect("MailSecretary.aspx?hcode" + this._strHeaderCode);
            return;
        }
        this.RegisterClientScriptBlock("warn", "<SCRIPT language=\"JavaScript\">alert('删除邮件失败!');</SCRIPT>");
    }
Example #3
0
    protected void BtnDelY_Click(object sender, EventArgs e)
    {
        MailManage mailManage = new MailManage();

        if (mailManage.DelMail(this._iMailID, this._strSenderCode))
        {
            if (this._strMailBox == "s")
            {
                base.Response.Redirect("InBox.aspx");
                return;
            }
            if (this._strMailBox == "d")
            {
                base.Response.Redirect("OutBox.aspx");
                return;
            }
            if (this._strMailBox == "l")
            {
                base.Response.Redirect("TrashBox.aspx");
            }
        }
    }