示例#1
0
    /// <summary>
    /// 删除
    /// </summary>
    /// <param name="Id"></param>
    private void DeleteNws(int Id)
    {
        long info = bll.delete(Convert.ToString(Id));

        if (info > 0)
        {
            Tz888.Common.MessageBox.Show(this.Page, "删除成功");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "删除失败");
        }

        this.GetInfoNews();
    }
示例#2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string[] values = Request.Form.GetValues("cbxSelect");
        Tz888.BLL.offer.CapitalInfoManage bllobj = new Tz888.BLL.offer.CapitalInfoManage();

        StringBuilder sb = new StringBuilder();

        foreach (string str in values)
        {
            bool b = Dcommon.bBuyInfoOfUserName(Convert.ToString(str.ToString().Trim()));

            if (b != true)
            {
                string name = casesInfo.PaperExeists(Convert.ToInt32(str.ToString().Trim()));
                if (name != "")
                {
                    string[] html = name.Split('/');
                    string[] cc   = html[2].Split('.');
                    com.DeleteFile(@TZStatic + html[1].ToString() + @"\" + html[2].ToString());
                }
                else
                {
                    sb.Append("编号:" + str.ToString().Trim() + ",删除失败\\n");
                }
                long info = bllobj.delete(str.Trim());
                if (info > 0)
                {
                    Tz888.Common.MessageBox.Show(this.Page, "删除成功");
                }
                else
                {
                    Tz888.Common.MessageBox.Show(this.Page, "删除失败");
                }

                this.GetInfoNews();
            }
            else
            {
                Tz888.Common.MessageBox.Show(this.Page, "该信息已有用户购买,不能删除");
            }
        }
    }