QMS.Web.Tool/Controllers/ToolController.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using QMS.Common;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;
namespace QMS.Web.Tool.Controllers
{
public class ToolController : Controller
{
#region 代码生成
public ActionResult GetClass()
{
return View();
}
[HttpPost]
public ActionResult GetClass(string ProjectName, string AreaName, string TableName, string ClassName, string ClassDesc, string ObjName, string Author, int SubmitType = 1)
{
CreateCode crCode = new CreateCode();
crCode.ColumnName = "FieldName";
crCode.DataType = "DataType";
crCode.Length = "Length";
crCode.ColumnDesc = "ColumnDescription";
crCode.TableName = TableName;
crCode.ProjectName = ProjectName;
crCode.AreaName = AreaName;
crCode.ClassName = ClassName;
crCode.ClassDesc = ClassDesc;
crCode.ObjName = ObjName;
crCode.Author = Author;
crCode.SaveModelPath = Request.PhysicalApplicationPath.Replace("Web.Tool", "Model");
crCode.SaveDALPath = Request.PhysicalApplicationPath.Replace("Web.Tool", "DAL");
crCode.SaveBLLPath = Request.PhysicalApplicationPath.Replace("Web.Tool", "BLL");
crCode.SaveClassFactoryPath = Request.PhysicalApplicationPath.Replace("Web.Tool", "BLL");
crCode.SaveDbUtilityPath = Request.PhysicalApplicationPath.Replace("Web.Tool", "Model");
crCode.SavePath = Request.PhysicalApplicationPath;
crCode.DataUsing = "System.Data.SqlClient";
crCode.DataConn = "Config.SqlHelper()";
crCode.DataPara = "SqlParameter";
crCode.DataParaNew = "new SqlParameter";
crCode.DataReader = "SqlDataReader";
crCode.Transaction = "SqlTransaction";
switch (SubmitType)
{
case 1:
if (string.IsNullOrEmpty(TableName))
{
ViewBag.ErrMsg = "请选择表名";
return View();
}
else
{
Common.CreateOne(crCode, TableName);
}
后面还有 62 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
