提交代码
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
namespace BLL
|
||||
{
|
||||
using Model;
|
||||
using Newtonsoft.Json;
|
||||
using NPOI.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -127,6 +128,7 @@
|
||||
EnglishRemark = project.EnglishRemark,
|
||||
ProjectRealCode = project.ProjectRealCode,
|
||||
IsCNCECShow = project.IsCNCECShow,
|
||||
MasterSysId = project.MasterSysId,
|
||||
};
|
||||
db.Base_Project.InsertOnSubmit(newProject);
|
||||
db.SubmitChanges();
|
||||
@@ -173,6 +175,8 @@
|
||||
newProject.EnglishRemark = project.EnglishRemark;
|
||||
newProject.ProjectRealCode = project.ProjectRealCode;
|
||||
newProject.IsCNCECShow = project.IsCNCECShow;
|
||||
newProject.MasterSysId = project.MasterSysId;
|
||||
|
||||
db.SubmitChanges();
|
||||
HSEDataCollectService.ProjectHSEDataCollectSubmission(newProject);
|
||||
CQMSDataCollectService.ProjectCQMSDataCollectSubmission(newProject);
|
||||
@@ -675,5 +679,59 @@
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取主数据项目
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<CNCEC_MasterData_PcEp> GetMasterProjectInfos()
|
||||
{
|
||||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
Dictionary<string, string> dic = new Dictionary<string, string>()
|
||||
{
|
||||
{"collCropCode", thisUnit.CollCropCode}
|
||||
};
|
||||
List<CNCEC_MasterData_PcEp> projectlist = new List<CNCEC_MasterData_PcEp>();
|
||||
var returnData = ServerService.GerDataFromCncec("api/Common/GetMasterDataProjectByCollCropCode", dic, null);
|
||||
if (returnData != null && returnData.code == 1)
|
||||
{
|
||||
projectlist = JsonConvert.DeserializeObject<List<CNCEC_MasterData_PcEp>>(returnData.data.ToString());
|
||||
}
|
||||
|
||||
return projectlist;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取主数据项目(下拉框)
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitMasterProjectDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "SysId";
|
||||
dropName.DataTextField = "PrjName";
|
||||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
Dictionary<string, string> dic = new Dictionary<string, string>()
|
||||
{
|
||||
{"collCropCode", thisUnit.CollCropCode}
|
||||
};
|
||||
List<CNCEC_MasterData_PcEp> projectlist = new List<CNCEC_MasterData_PcEp>();
|
||||
var returnData = ServerService.GerDataFromCncec("api/Common/GetMasterDataProjectByCollCropCode", dic, null);
|
||||
if (returnData != null && returnData.code == 1)
|
||||
{
|
||||
projectlist = JsonConvert.DeserializeObject<List<CNCEC_MasterData_PcEp>>(returnData.data.ToString());
|
||||
}
|
||||
|
||||
dropName.DataSource = projectlist;
|
||||
dropName.DataBind();
|
||||
if (projectlist.Count() == 0)
|
||||
{
|
||||
isShowPlease = true;
|
||||
}
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user