|
|
@@ -81,11 +81,34 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// 增加或修改商学院创客学堂信息
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public IActionResult Add(string right)
|
|
|
+ public IActionResult Add(string right, string PColId, string CurColId)
|
|
|
{
|
|
|
ViewBag.RightInfo = RightInfo;
|
|
|
ViewBag.right = right;
|
|
|
-
|
|
|
+ ViewBag.CurColId = CurColId;
|
|
|
+ if (string.IsNullOrEmpty(PColId))
|
|
|
+ {
|
|
|
+ PColId = "001";
|
|
|
+ }
|
|
|
+ ViewBag.PColId = PColId;
|
|
|
+ // string code = "";
|
|
|
+ // int len = PColId.Length + 3;
|
|
|
+ // Col model = bsdb.Col.Where(m => m.ColId.StartsWith(PColId) && m.ColId.Length == len).OrderByDescending(m => m.ColId).FirstOrDefault();
|
|
|
+ // if (model != null)
|
|
|
+ // {
|
|
|
+ // string CurCode = model.ColId;
|
|
|
+ // int num = int.Parse(CurCode.Substring(CurCode.Length - 3)) + 1;
|
|
|
+ // code = num.ToString();
|
|
|
+ // for (int i = 0; i < 3 - num.ToString().Length; i++)
|
|
|
+ // {
|
|
|
+ // code = "0" + code;
|
|
|
+ // }
|
|
|
+ // code = PColId + code;
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // code = PColId + "001";
|
|
|
+ // }
|
|
|
|
|
|
return View();
|
|
|
}
|
|
|
@@ -99,7 +122,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
- public string Add(SchoolMakerStudy data)
|
|
|
+ public string Add(SchoolMakerStudy data, string PColId = "", string CurColId = "")
|
|
|
{
|
|
|
Dictionary<string, object> Fields = new Dictionary<string, object>();
|
|
|
|
|
|
@@ -127,7 +150,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// 增加或修改商学院创客学堂信息
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public IActionResult Edit(string right, int Id = 0)
|
|
|
+ public IActionResult Edit(string right, string ColId, string PColId, string CurColId, int Id = 0)
|
|
|
{
|
|
|
ViewBag.RightInfo = RightInfo;
|
|
|
ViewBag.right = right;
|
|
|
@@ -147,7 +170,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
- public string Edit(SchoolMakerStudy data)
|
|
|
+ public string Edit(SchoolMakerStudy data, string PColId = "", string CurColId = "")
|
|
|
{
|
|
|
Dictionary<string, object> Fields = new Dictionary<string, object>();
|
|
|
|