Views/Set/System/CreateMicroDataTable.ashx
(开头部分) 93KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<%@ WebHandler Language="C#" Class="CreateMicroDataTable" %>
using System;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using MicroPublicHelper;
using MicroDBHelper;
using Newtonsoft.Json.Linq;
public class CreateMicroDataTable : IHttpHandler, System.Web.SessionState.IRequiresSessionState
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
string flag = "提交失败,请检查URL参数<br/>The submission failed. Check the URL parameters",
Action = context.Server.UrlDecode(context.Request.Form["action"]),
MID = context.Server.UrlDecode(context.Request.Form["mid"]),
Fields = context.Server.UrlDecode(context.Request.Form["fields"]);
if (!string.IsNullOrEmpty(Action) && !string.IsNullOrEmpty(MID) && !string.IsNullOrEmpty(Fields))
{
if (Action.Trim().ToLower() == "add")
flag = CreateDataTable(MID.Trim(), Fields.Trim());
}
context.Response.Write(flag);
}
/// <summary>
/// 创建数据表
/// </summary>
/// <param name="mid"></param>
/// <param name="field"></param>
/// <returns></returns>
private string CreateDataTable(string MID, string Fields)
{
string flag = "创建失败<br/>Failed to create", TableName = string.Empty, ShortTableName = string.Empty, ApprovalForm = string.Empty, BasicInfo = string.Empty, Dept = string.Empty, PCInfo = string.Empty, TitleContent = string.Empty, ApplicationType = string.Empty, HopeDate = string.Empty, Title = string.Empty, tbDone = string.Empty, tbMainSub = string.Empty, PrimaryKeyName = string.Empty, Description = string.Empty;
Boolean bitMainSub = false;
string createApprovalForm = string.Empty, createBasicInfo = string.Empty, createDept = string.Empty, createPCInfo = string.Empty, createTitleContent = string.Empty, createApplicationType = string.Empty, createHopeDate = string.Empty;
try
{
dynamic json = JToken.Parse(Fields) as dynamic;
TableName = json["txtTableName"];
ShortTableName = json["txtShortTableName"];
ApprovalForm = json["ckApprovalForm"]; //创建: FormID int NULL, FormNumber varchar (200) NULL, FormState nvarchar (200) NULL, StateCode int NULL,
BasicInfo = json["ckBasicInfo"]; //创建: Applicant nvarchar (200) NULL, Phone varchar (30) NULL, Tel varchar (200) NULL, UID int NULL, DisplayName nvarchar (200) NULL,
Dept = json["ckDept"]; //创建: DeptID int NULL,
PCInfo = json["ckPCInfo"]; //创建:PCLoginID varchar (200) NULL, PCName varchar (100) NULL, Mail varchar (200) NULL,
TitleContent = json["ckTitleContent"]; //创建: Title nvarchar (500) NULL, Content ntext NULL,
ApplicationType = json["ckApplicationType"]; //创建: ApplicationType varchar (100) NULL, ApplicationDate datetime NULL,
HopeDate = json["ckHopeDate"]; //创建: ApplicationDate datetime NULL,
后面还有 1396 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
