资源简介
Web网站开发项目案例
代码片段和文件信息
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using System.Data.OleDb;
using System.Text;
public partial class UserSynchro : System.Web.UI.Page
{
public string Action;
public string SysType_Source DbType_Source AcFile_Source SqlServer_Source SqlDbName_Source SqlUser_Source SqlPass_Source;
public string SysType_Remote DbType_Remote AcFile_Remote SqlServer_Remote SqlDbName_Remote SqlUser_Remote SqlPass_Remote;
public bool NeedOverwrite NeedBatch;
public int TotalRecord SkipRecord OverwriteRecord SuccessRecord FailedRecord BatchNum;
public string ConnStr;
public string ServerMsg SQL_Source;
public IDbConnection Conn_SourceConn_Remote;
public IDbDataAdapter DataAdapter_Source DataAdapter_Remote;
public string source_table remote_table PE_table remote_c source_c;
///
/// 程序入口
///
///
///
protected void Page_Load(object sender EventArgs e)
{
Action = base.Request[“action“];
switch (Action)
{
case “TestConn“: //测试链接
TestConn();
break;
case “start“: //开始
Main();
break;
}
}
///
/// 测试链接
///
public void TestConn()
{
string TestType;
TestType = Request.Form[“testtype“];
if (TestType == “source“)
{
GetSourceInfo();
TestSource();
CleanConns();
ServerMsg = “{0}源数据库连接测试成功。“;
WriteMsg();
}
else
{
GetRemoteInfo();
TestRemote();
CleanConns();
ServerMsg = “{0}目标数据库连接测试成功。“;
WriteMsg();
}
}
///
/// 同步主函数
///
public void Main()
{
GetSourceInfo();
GetRemoteInfo();
GetOptionInfo();
InitHTML();
CheckParam();
TestSource();
IDbCommand cmd = Conn_Source.CreateCommand();
cmd.CommandText = GetSqlString();
DataSet ds = new DataSet();
DataAdapter_Source.SelectCommand = cmd;
DataAdapter_Source.Fill(ds);
if (ds.Tables[0].Rows.Count>0)
{
TotalRecord = ds.Tables[0].Rows.Count-1;
}
else
{
ServerMsg = “源数据库中没有记录,不需要同步!“;
WriteMsg();
}
SuccessRecord = Convert.ToInt32(Request.Form[“SucNum“]);
SkipRecord = Convert.ToInt32(Request.Form[“SkipNum“]);
OverwriteRecord = Convert.ToIn
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 132 2012-02-22 10:02 BizIdea.Standard_4.6.0.0_20120222\01-环境配置指南.url
文件 132 2012-02-22 10:02 BizIdea.Standard_4.6.0.0_20120222\02-详细安装说明.url
文件 132 2012-02-22 10:02 BizIdea.Standard_4.6.0.0_20120222\03-安装疑难解答.url
文件 132 2012-02-22 10:02 BizIdea.Standard_4.6.0.0_20120222\04-用户帮助手册.url
文件 127 2012-02-22 10:02 BizIdea.Standard_4.6.0.0_20120222\05-视频录像教程.url
....... 8271 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\Author.aspx
....... 3275 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\AuthorGuide.aspx
....... 596 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\AuthorList.aspx
....... 4868 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\AuthorManage.aspx
....... 5623 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\Bank.aspx
....... 768 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\BankGuide.aspx
....... 4911 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\BankManage.aspx
....... 3378 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\CacheManage.aspx
....... 1076 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\CacheManageGuide.aspx
....... 1365 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\CacheShow.aspx
....... 9221 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\CompareFilesOnline.aspx
....... 874 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\CompareFilesOnlineGuide.aspx
....... 2178 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\DownloadErrorGuide.aspx
....... 4250 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\DownloadErrorManage.aspx
....... 3703 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\DownServer.aspx
....... 1364 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\DownServerGuide.aspx
....... 6236 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\DownServerList.aspx
....... 4778 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\DownServerManage.aspx
....... 2239 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\DownServerOrder.aspx
....... 18281 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\FileManage.aspx
....... 172 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\FileServerAttestationServer.ashx
....... 684 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\FilesGuide.aspx
....... 3531 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\FileUpload.aspx
....... 164 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\FileUploadRecordService.ashx
....... 3300 2012-02-22 10:01 BizIdea.Standard_4.6.0.0_20120222\WebSite\Admin\Accessories\FloatingFileUpload.aspx
............此处省略3810个文件信息
- 上一篇:飞思卡尔”杯智能汽车竞赛设计与实践
- 下一篇:编译原理龙书中文版,全网最清晰带目录
评论
共有 条评论