private void Delete(long num)
    {
        bool b = Dcommon.bBuyInfoOfUserName(Convert.ToString(num));

        if (b)
        {
            string name = page.SelHtmlFile(Convert.ToString(num));
            if (name != "")
            {
                string[] html = name.Split('/');
                com.DeleteFile(@RZStatic + html[1].ToString() + "\\" + html[2].ToString());
            }
            long info = project.delete(Convert.ToInt32(num));
            if (info >= 0)
            {
                Tz888.Common.MessageBox.Show(this.Page, "删除成功");
            }
            else
            {
                Tz888.Common.MessageBox.Show(this.Page, "删除失败");
            }

            this.SetPagerParameters();
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "该信息已有用户购买,不能删除");
        }
    }
示例#2
0
    /// <summary>
    /// 删除记录
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void LinkButton1_Command(object sender, CommandEventArgs e)
    {
        int  Id = Convert.ToInt32(e.CommandArgument);
        bool b  = Dcommon.bBuyInfoOfUserName(Convert.ToString(Id));

        if (b != true)
        {
            string name = casesInfo.PaperExeists(Id);
            if (name != "")
            {
                string[] html = name.Split('/');
                string[] cc   = html[2].Split('.');
                com.DeleteFile(@TZStatic + html[1].ToString() + @"\" + html[2].ToString());
            }
            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();
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "该信息已有用户购买,不能删除");
        }
    }
示例#3
0
    private void DeleteLoansInfoTab(int Id)
    {
        Tz888.Model.LoansInfoTab infotab = loansinfotabbll.GetLoansInfoTabByLoansInfoId(Id);
        int result1 = loansinfobll.DeleteLoansInfo(Id);
        int result2 = loanscontactstab.DeleteloanscontactsTab(Id);

        if (result1 > 0 && result2 > 0)
        {
            int result = loansinfotabbll.DeleteLoansInfoTab(Id);

            if (infotab.Url.Trim() != "")
            {
                string[] html = infotab.Url.Split('/');
                string[] cc   = html[2].Split('.');
                com.DeleteFile(@CasesTem + html[1].ToString() + @"\" + html[2].ToString());
            }
            if (result > 0)
            {
                Tz888.Common.MessageBox.Show(this.Page, "删除成功");
            }
            else
            {
                Tz888.Common.MessageBox.Show(this.Page, "删除失败");
            }
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "删除失败");
        }
    }
示例#4
0
    /// <summary>
    /// 删除
    /// </summary>
    /// <param name="Id">Id</param>
    private void DeleteNws(int Id)
    {
        string name = casesInfo.PaperExeists(Id);

        if (name != "")
        {
            string[] html = name.Split('/');
            string[] cc   = html[2].Split('.');
            com.DeleteFile(@zsStatic + html[1].ToString() + @"\" + html[2].ToString());
        }
        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();
    }
示例#5
0
    private void DeleteLoansInfoTab(int Id)
    {
        ReportTab reporttab = reporttabbll.GetModel(Id);

        if (reporttab.Html != "")
        {
            string[] html = reporttab.Html.Split('/');//Professional/201103/Professional20110321_7.shtml
            string[] cc   = html[2].Split('.');
            com.DeleteFile(@PsStatic + html[1].ToString() + @"\" + html[2].ToString());
        }
        if (reportviewbll.DeletereportView(Id) > 0)
        {
            if (reporttabbll.DeletereportTab(Id) > 0)
            {
                Response.Write("<script>alert('删除成功');location.href='reportList.aspx'</script>");
            }
            else
            {
                Response.Write("<script>alert('删除失败');location.href='reportList.aspx'</script>");
            }
        }
        BindShow();
    }
示例#6
0
    private void DeleteLoansInfoTab(int Id)
    {
        Tz888.Model.NewsTab newstab = newstabbll.GetNewsTabByNewId(Id);
        int result2 = newsviewtabbll.DeleteNewsViewTab(Id);
        int result1 = newstabbll.DeleteNewsTab(Id);

        if (result1 > 0 && result2 > 0)
        {
            if (newstab.Urlhtml.Trim() != "")
            {
                string[] html = newstab.Urlhtml.Split('/');
                string[] cc   = html[2].Split('.');
                com.DeleteFile(@CasesTem + html[1].ToString() + @"\" + html[2].ToString());
            }


            Tz888.Common.MessageBox.Show(this.Page, "删除成功");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "删除失败");
        }
    }
示例#7
0
    /// <summary>
    /// 删除
    /// </summary>
    /// <param name="TID"></param>
    private void DelZS(int TID)
    {
        string name = casesInfo.PaperExeists(TID);

        if (name != "")
        {
            string[] html = name.Split('/');
            string[] cc   = html[2].Split('.');
            com.DeleteFile(@"F:\topfo\News\Caseshtml\" + html[1].ToString() + "\\" + html[2].ToString());
        }
        long info = casesInfo.delete(TID);

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

        this.SetPagerParameters();
        this.Pager1.DataBind();
    }
示例#8
0
    private void Del(int id)
    {
        string ComTerm = ConfigurationManager.AppSettings["ComPanyPath"].ToString(); //企业名片模版存放位置
        string num     = pany.SelHtmlFile(id);                                       //判断静态模版所对应的路径是否存在 即:htmlfile是否为空

        if (num != "")
        {
            string[] com  = num.Split('/');
            string   term = ComTerm + "\\" + com[1] + "\\" + com[2];
            comPage.DeleteFile(term);    //如果静态模版存在,删除静态模版
        }
        int delte = pany.DelCompany(id); //删除这条数据

        if (delte >= 0)
        {
            Tz888.Common.MessageBox.Show(this.Page, "删除成功!");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "删除失败!");
        }
        dataBind();
    }
示例#9
0
 public void DeleteFile(string FolderPathName)
 {
     com.DeleteFile(FolderPathName);
 }