Song.Site/Check/Dbup_20161024.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WeiSha.Common;
using Song.ServiceInterfaces;
using Song.Entities;
using System.Data.SqlClient;
namespace Song.Site.Check
{
public partial class Dbup_20161024 : System.Web.UI.Page
{
//机构id
int orgid = WeiSha.Common.Request.QueryString["orgid"].Int32 ?? 0;
protected void Page_Load(object sender, EventArgs e)
{
//if (index > 1)
//{
// btnDataTras_Click(null, null);
//}
//此页面的ajax提交,全部采用了POST方式
if (Request.ServerVariables["REQUEST_METHOD"] == "POST")
{
string action = WeiSha.Common.Request.Form["action"].String;
switch (action)
{
case "btnStruct":
btnStruct_Click(null, null);
break;
case "btnDataTras":
btnDataTras_Click(null, null);
break;
}
}
}
/// <summary>
/// 调整试题的数据库结构
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnStruct_Click(object sender, EventArgs e)
{
string msg = "";
try
{
string sql = @"alter table [Questions] ALTER COLUMN [Qus_Explain] [nvarchar](max) NULL
alter table [Questions] add Qus_Items [nvarchar](max) NULL
alter table [Questions] add Qus_IsTitle [bit] NULL
update [Questions] set Qus_IsTitle=1
alter table [Questions] ALTER COLUMN Qus_IsTitle [bit] NOT NULL
alter table [QuesAnswer] ALTER COLUMN Qus_ID [int] NOT NULL
alter table QuesAnswer DROP COLUMN Org_ID
alter table QuesAnswer DROP COLUMN Org_Name
alter table [Questions] add [Ol_Name] [nvarchar](500) NULL
";
foreach (string s in sql.Split('\r'))
{
if (!string.IsNullOrWhiteSpace(s))
后面还有 58 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
