Exemplo n.º 1
0
    /// <summary>
    /// 导入按钮事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ButtonImport_Click(object sender, EventArgs e)
    {
        WebBean bean = WebBean.GetInstance();

        try
        {
            if (RadioButtonCover.Checked)
            {
                bean.DeleteAllUrl();
            }
            DivContent = new StringBuilder();
            SqlValues  = new StringBuilder();
            CreateDirectoryFiles(TextBoxImportDirectory.Text.Trim());
            bean.ImportUrl(SqlValues.ToString());
            //tempdiv.InnerText = divContent.ToString();
            Show(Page, "导入成功!");
        }
        catch (Exception exception)
        {
            WriteLog.WriteExceptionLog(exception.ToString());
            Show(Page, "导入失败!");
        }
    }