提交代码
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
using System.Linq;
|
||||
using Model;
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public static class ProjectService
|
||||
{
|
||||
@@ -724,5 +725,59 @@
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <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