SGGL_SHJ/SGGL/BLL/HJGL/WeldingManage/PipelineComponentService.cs

562 lines
24 KiB
C#
Raw Normal View History

2023-02-20 10:49:51 +08:00
using System;
2023-11-08 17:26:59 +08:00
using System.Collections;
2023-02-20 10:49:51 +08:00
using System.Collections.Generic;
2023-11-08 17:26:59 +08:00
using System.Data;
2022-09-05 16:36:31 +08:00
using System.Linq;
using System.Web.UI.WebControls;
2023-09-11 11:40:38 +08:00
using Model;
2023-11-08 17:26:59 +08:00
using NPOI.SS.Formula.Functions;
2022-09-05 16:36:31 +08:00
namespace BLL
{
public class HJGL_PipelineComponentService
{
2024-11-06 09:36:10 +08:00
/// <summary>
2024-11-06 09:59:54 +08:00
/// 待整改
2024-11-06 09:36:10 +08:00
/// </summary>
2024-11-06 09:59:54 +08:00
public static int StatePenRec = -2;
/// <summary>
/// 已整改
/// </summary>
public static int StateRec = -1;
2022-09-05 16:36:31 +08:00
/// <summary>
/// 未验收
/// </summary>
2024-11-06 09:59:54 +08:00
public static int State0 = 0;
2023-11-08 17:26:59 +08:00
2022-09-05 16:36:31 +08:00
/// <summary>
/// 已验收
/// </summary>
2024-11-06 09:59:54 +08:00
public static int State1 = 1;
2023-11-08 17:26:59 +08:00
2022-09-05 16:36:31 +08:00
/// <summary>
/// 已装箱
/// </summary>
2024-11-06 09:59:54 +08:00
public static int State2 = 2;
2024-10-09 17:20:12 +08:00
2023-02-20 10:49:51 +08:00
2023-11-08 17:26:59 +08:00
/// <summary>
/// 获取状态名称
/// </summary>
/// <returns></returns>
2022-09-05 16:36:31 +08:00
public static ListItem[] GetState()
{
2024-11-06 09:59:54 +08:00
ListItem[] list = new ListItem[5];
list[0] = new ListItem("未验收", State0.ToString());
list[1] = new ListItem("已验收", State1.ToString());
list[2] = new ListItem("已出库", State2.ToString());
list[3] = new ListItem("待整改", StatePenRec.ToString());
list[4] = new ListItem("已整改", StateRec.ToString());
2022-09-05 16:36:31 +08:00
return list;
}
2023-11-08 17:26:59 +08:00
/// <summary>
/// 生产状态
/// </summary>
/// <returns></returns>
2023-02-20 10:49:51 +08:00
public static ListItem[] GetProductionState()
{
ListItem[] list = new ListItem[3];
list[0] = new ListItem("未开始", "0");
list[1] = new ListItem("已开始", "1");
list[2] = new ListItem("已完成", "2");
return list;
}
2022-09-05 16:36:31 +08:00
/// <summary>
/// 根据ID获取组件信息
/// </summary>
/// <param name="pipelineName"></param>
/// <returns></returns>
public static Model.HJGL_Pipeline_Component GetPipelineComponentById(string pipelineComponentId)
{
return Funs.DB.HJGL_Pipeline_Component.FirstOrDefault(e => e.PipelineComponentId == pipelineComponentId);
}
public static Model.HJGL_Pipeline_Component GetPipelineComponentByCodeandpipelineId(string pipelineComponentCode, string pipelineId)
{
var q = Funs.DB.HJGL_Pipeline_Component.FirstOrDefault(x => x.PipelineComponentCode == pipelineComponentCode && x.PipelineId == pipelineId);
return q;
}
/// <summary>
/// 根据材料信息id获取组件信息
/// </summary>
/// <param name="pipeLineMatId"></param>
/// <returns></returns>
public static Model.HJGL_Pipeline_Component GetPipelineComponentByMatId(string pipeLineMatId)
{
return Funs.DB.HJGL_Pipeline_Component.FirstOrDefault(e => e.PipeLineMatId == pipeLineMatId);
}
2023-11-08 17:26:59 +08:00
2025-05-12 19:05:13 +08:00
/// <summary>
/// 获取预制散件
/// </summary>
/// <param name="unitworkId">单位工程Id</param>
/// <param name="pipelineId">管线Id</param>
/// <returns></returns>
public static IEnumerable<PipelinePrefabricatedComponentsItem> GetPipelinePrefabricatedComponent(string unitworkId, string pipelineId)
{
var query = from pipe in Funs.DB.HJGL_PipeLineMat
join lib in Funs.DB.HJGL_MaterialCodeLib on pipe.MaterialCode equals lib.MaterialCode into libJoin
from libItem in libJoin.DefaultIfEmpty()
join line in Funs.DB.HJGL_Pipeline on pipe.PipelineId equals line.PipelineId into lineJoin
from lineItem in lineJoin.DefaultIfEmpty()
where lineItem != null && lineItem.UnitWorkId == unitworkId && lineItem.PipeArea == "1"
&& (pipe.PrefabricatedComponents == null || pipe.PrefabricatedComponents == "")
select new PipelinePrefabricatedComponentsItem
{
Id = pipe.PipeLineMatId,
MaterialCode = libItem.MaterialCode,
MaterialName = libItem.MaterialName,
MaterialUnit = libItem.MaterialUnit,
MaterialSpec = libItem.MaterialSpec,
MaterialMade = libItem.MaterialMade,
MaterialDef = libItem.MaterialDef,
Number = pipe.Number,
PrefabricatedComponents = pipe.PrefabricatedComponents,
PipelineId = lineItem.PipelineId,
};
if (!string.IsNullOrEmpty(pipelineId))
{
query = query.Where(x => x.PipelineId == pipelineId);
}
query = query.OrderBy(x => x.PrefabricatedComponents);
return query.ToList();
}
/// <summary>
/// 获取预制散件
/// </summary>
/// <param name="pipelineId">管线Id</param>
/// <returns></returns>
public static IEnumerable<PipelinePrefabricatedComponentsItem> GetPipelinePrefabricatedComponent(string pipelineId)
{
var query = from pipe in Funs.DB.HJGL_PipeLineMat
join lib in Funs.DB.HJGL_MaterialCodeLib on pipe.MaterialCode equals lib.MaterialCode into libJoin
from libItem in libJoin.DefaultIfEmpty()
join line in Funs.DB.HJGL_Pipeline on pipe.PipelineId equals line.PipelineId into lineJoin
from lineItem in lineJoin.DefaultIfEmpty()
where lineItem != null && lineItem.PipeArea == "1"
&& (pipe.PrefabricatedComponents == null || pipe.PrefabricatedComponents == "")
select new PipelinePrefabricatedComponentsItem
{
Id = pipe.PipeLineMatId,
MaterialCode = libItem.MaterialCode,
MaterialName = libItem.MaterialName,
MaterialUnit = libItem.MaterialUnit,
MaterialSpec = libItem.MaterialSpec,
MaterialMade = libItem.MaterialMade,
MaterialDef = libItem.MaterialDef,
Number = pipe.Number,
PrefabricatedComponents = pipe.PrefabricatedComponents,
PipelineId = lineItem.PipelineId,
};
if (!string.IsNullOrEmpty(pipelineId))
{
query = query.Where(x => x.PipelineId == pipelineId);
}
query = query.OrderBy(x => x.PrefabricatedComponents);
var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail
where x.PipelineId == pipelineId
&& (x.PipelineComponentId == null || x.PipelineComponentId == "")
select x).ToList();
var queryList = query.ToList();
// 优化 Linq 过滤条件
var result = (from x in queryList
join y in inoutplandetail on x.MaterialCode equals y.MaterialCode into yy
from y in yy.DefaultIfEmpty()
where y == null
select x).ToList();
return result;
}
2023-11-08 17:26:59 +08:00
/// <summary>
/// 获取打印实体
/// </summary>
/// <param name="PipelineComponentId"></param>
/// <param name="PipelineId"></param>
/// <param name="IsCheckPrint"></param>
/// <returns></returns>
2025-05-12 19:05:13 +08:00
public static IEnumerable<PipelineComponentPrintDto> GetPrintModelByPipelineComponentIds(string[] PipelineComponentId, string[] PipelineId, bool IsCheckPrint)
2023-11-08 17:26:59 +08:00
{
var db = Funs.DB;
var query =
from com in db.HJGL_Pipeline_Component
join mat in db.HJGL_PipeLineMat on com.PipeLineMatId equals mat.PipeLineMatId into matJoin
from mat in matJoin.DefaultIfEmpty()
join pipe in db.HJGL_Pipeline on com.PipelineId equals pipe.PipelineId into pipeJoin
from pipe in pipeJoin.DefaultIfEmpty()
join punit in db.Base_Unit on com.PreUnit equals punit.UnitId into punitJoin
from punit in punitJoin.DefaultIfEmpty()
join aunit in db.Base_Unit on com.AssembleUnit equals aunit.UnitId into aunitJoin
from aunit in aunitJoin.DefaultIfEmpty()
join unitwork in db.WBS_UnitWork on pipe.UnitWorkId equals unitwork.UnitWorkId into unitworkJoin
from unitwork in unitworkJoin.DefaultIfEmpty()
join mater in db.Base_Material on pipe.MaterialId equals mater.MaterialId into materJoin
from mater in materJoin.DefaultIfEmpty()
2025-02-18 17:38:49 +08:00
where com.QRCode != ""
orderby com.PipelineComponentCode, com.PipelineId
2023-11-08 17:26:59 +08:00
select new PipelineComponentPrintDto
{
PipelineComponentId = com.PipelineComponentId,
PipelineComponentCode = com.PipelineComponentCode,
BoxNumber = com.BoxNumber,
UnitWorkName = unitwork.UnitWorkName,
PipelineId = com.PipelineId,
PreUnit = punit.UnitName,
AssembleUnit = aunit.UnitName,
PrefabricatedComponents = mat.PrefabricatedComponents,
QRCode = com.QRCode,
State = com.State,
PlanStartDate = string.Format("yyyy-MM-dd", pipe.PlanStartDate),
PipelineCode = pipe.PipelineCode,
FlowingSection = pipe.FlowingSection,
QRCode2 = "PrePipeline$" + com.PipelineComponentId,
MaterialCode = mater.MaterialCode,
IsPrint = com.IsPrint
};
2025-02-18 17:38:49 +08:00
2023-11-08 17:26:59 +08:00
var result = query.ToList();
2025-02-18 17:38:49 +08:00
if (PipelineComponentId != null && PipelineComponentId.Length > 0)
2023-11-08 17:26:59 +08:00
{
result = result.Where(x => PipelineComponentId.Contains(x.PipelineComponentId.ToString())).ToList();
}
2025-02-18 17:38:49 +08:00
2023-11-08 17:26:59 +08:00
if (PipelineId != null && PipelineId.Length > 0)
{
result = result.Where(x => PipelineId.Contains(x.PipelineId.ToString())).ToList();
2025-02-18 17:38:49 +08:00
// 按照传入的 PipelineId 顺序排序
result = result.OrderBy(x => Array.IndexOf(PipelineId, x.PipelineId.ToString())).ToList();
2023-11-08 17:26:59 +08:00
}
2025-02-18 17:38:49 +08:00
// if (IsCheckPrint != null & IsCheckPrint == true)
// {
// result = result.Where(x => x.IsPrint == false || x.IsPrint == null).ToList();
// }
2023-11-08 17:26:59 +08:00
return result;
}
2022-09-05 16:36:31 +08:00
/// <summary>
/// 判断管线组件Code是否存在
/// </summary>
/// <param name="pipelineComponentCode"></param>
/// <param name="pipelineComponentId"></param>
/// <returns></returns>
public static bool IsExistPipelineComponentCode(string pipelineComponentCode, string pipelineId, string pipelineComponentId)
{
Model.SGGLDB db = Funs.DB;
Model.HJGL_Pipeline_Component q = null;
if (!string.IsNullOrEmpty(pipelineComponentId))
{
q = Funs.DB.HJGL_Pipeline_Component.FirstOrDefault(x => x.PipelineComponentCode == pipelineComponentCode && x.PipelineId == pipelineId && x.PipelineComponentId != pipelineComponentId);
}
else
{
q = Funs.DB.HJGL_Pipeline_Component.FirstOrDefault(x => x.PipelineComponentCode == pipelineComponentCode && x.PipelineId == pipelineId);
}
if (q != null)
{
return true;
}
else
{
return false;
}
}
/// <summary>
/// 根据管线材料id同步组件
/// </summary>
public static void SyncPipelineComponentByMatId(string pipeLineMatId)
{
var model_mat = BLL.PipelineMatService.GetPipeLineMat(pipeLineMatId);
var PipelineId = model_mat.PipelineId;
var PipeArea = BLL.PipelineService.GetPipelineByPipelineId(PipelineId).PipeArea;
if (PipeArea=="1" &&!string.IsNullOrEmpty(model_mat.PrefabricatedComponents))
2022-09-05 16:36:31 +08:00
{
// var model = GetPipelineComponentByMatId(pipeLineMatId);
var model = GetPipelineComponentByCodeandpipelineId(model_mat.PrefabricatedComponents,PipelineId);
if (model!=null)
{
model.PipelineId = PipelineId;
model.PipelineComponentCode = model_mat.PrefabricatedComponents;
model.DrawingName = model_mat.PrefabricatedComponents.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-')).Replace("\"", "");
2024-11-06 09:59:54 +08:00
model.State = State0;
2023-02-20 10:49:51 +08:00
model.ProductionState = 0;
2022-09-05 16:36:31 +08:00
UpdatePipelineComponent(model);
}
else
{
model=new Model.HJGL_Pipeline_Component();
model.PipelineComponentId = SQLHelper.GetNewID();
model.PipelineId = PipelineId;
model.PipelineComponentCode = model_mat.PrefabricatedComponents;
2024-09-27 18:17:21 +08:00
model.DrawingName = model_mat.PrefabricatedComponents?.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-')).Replace("\"", "");
2024-11-06 09:59:54 +08:00
model.State = State0;
2023-02-20 10:49:51 +08:00
model.ProductionState = 0;
2023-11-08 17:26:59 +08:00
model.IsPrint = false;
2022-09-05 16:36:31 +08:00
AddPipelineComponent(model);
}
}
2022-09-05 16:36:31 +08:00
}
/// <summary>
2025-05-12 19:05:13 +08:00
/// 添加管线预制组件
2022-09-05 16:36:31 +08:00
/// </summary>
/// <param name="pipeline"></param>
public static void AddPipelineComponent(Model.HJGL_Pipeline_Component pipeline)
{
Model.SGGLDB db = Funs.DB;
Model.HJGL_Pipeline_Component newPipeline = new Model.HJGL_Pipeline_Component();
2023-11-09 17:22:24 +08:00
pipeline.IsPrint = false;
2022-09-05 16:36:31 +08:00
newPipeline.PipelineComponentId = pipeline.PipelineComponentId;
newPipeline.PipelineId = pipeline.PipelineId;
newPipeline.PreUnit = pipeline.PreUnit;
newPipeline.PipelineComponentCode = pipeline.PipelineComponentCode;
newPipeline.BoxNumber = pipeline.BoxNumber;
newPipeline.AssembleUnit = pipeline.AssembleUnit;
newPipeline.PipeLineMatId = pipeline.PipeLineMatId;
newPipeline.State= pipeline.State;
newPipeline.QRCode= pipeline.QRCode;
newPipeline.PlanStartDate = pipeline.PlanStartDate;
newPipeline.PlanEndDate = pipeline.PlanEndDate;
newPipeline.ActStartDate = pipeline.ActStartDate;
newPipeline.ActEndDate = pipeline.ActEndDate;
2022-09-23 22:29:48 +08:00
newPipeline.DrawingName = pipeline.DrawingName;
2022-10-15 15:40:49 +08:00
newPipeline.ReceiveMan= pipeline.ReceiveMan;
newPipeline.ReceiveDate= pipeline.ReceiveDate;
2023-02-20 10:49:51 +08:00
newPipeline.ProductionState= pipeline.ProductionState;
2023-11-08 17:26:59 +08:00
newPipeline.IsPrint= pipeline.IsPrint;
2024-11-06 09:36:10 +08:00
newPipeline.Remark = pipeline.Remark;
2022-09-05 16:36:31 +08:00
db.HJGL_Pipeline_Component.InsertOnSubmit(newPipeline);
db.SubmitChanges();
}
/// <summary>
2025-05-12 19:05:13 +08:00
/// 修改管线预制组件
2022-09-05 16:36:31 +08:00
/// </summary>
/// <param name="pipeline"></param>
public static void UpdatePipelineComponent(Model.HJGL_Pipeline_Component pipeline)
{
Model.SGGLDB db = Funs.DB;
Model.HJGL_Pipeline_Component newPipeline = db.HJGL_Pipeline_Component.FirstOrDefault(e => e.PipelineComponentId == pipeline.PipelineComponentId);
if (newPipeline != null)
{
newPipeline.PipelineId = pipeline.PipelineId;
newPipeline.PreUnit = pipeline.PreUnit;
newPipeline.PipelineComponentCode = pipeline.PipelineComponentCode;
newPipeline.BoxNumber = pipeline.BoxNumber;
newPipeline.AssembleUnit = pipeline.AssembleUnit;
newPipeline.PipeLineMatId = pipeline.PipeLineMatId;
newPipeline.State = pipeline.State;
newPipeline.QRCode = pipeline.QRCode;
newPipeline.PlanStartDate = pipeline.PlanStartDate;
newPipeline.PlanEndDate = pipeline.PlanEndDate;
newPipeline.ActStartDate = pipeline.ActStartDate;
newPipeline.ActEndDate = pipeline.ActEndDate;
2022-09-23 22:29:48 +08:00
newPipeline.DrawingName = pipeline.DrawingName;
2022-10-15 15:40:49 +08:00
newPipeline.ReceiveMan = pipeline.ReceiveMan;
newPipeline.ReceiveDate = pipeline.ReceiveDate;
2023-02-20 10:49:51 +08:00
newPipeline.ProductionState = pipeline.ProductionState;
2023-11-08 17:26:59 +08:00
newPipeline.IsPrint=pipeline.IsPrint;
2024-11-06 09:36:10 +08:00
newPipeline.Remark = pipeline.Remark;
2022-09-05 16:36:31 +08:00
db.SubmitChanges();
}
}
2023-11-08 17:26:59 +08:00
/// <summary>
2025-05-12 19:05:13 +08:00
/// 修改组件出库状态
2023-11-08 17:26:59 +08:00
/// </summary>
/// <param name="pipelineComponentId"></param>
/// <param name="BoxNumber"></param>
2022-10-15 15:40:49 +08:00
public static void UpdateOutState(string pipelineComponentId,string BoxNumber)
2022-09-05 16:36:31 +08:00
{
var q=GetPipelineComponentById(pipelineComponentId);
2024-11-06 09:59:54 +08:00
if (q.State==State1)
2022-09-05 16:36:31 +08:00
{
2024-11-06 09:59:54 +08:00
q.State = State2;
2022-10-15 15:40:49 +08:00
q.BoxNumber=BoxNumber;
2022-09-05 16:36:31 +08:00
UpdatePipelineComponent(q);
}
2023-02-20 10:49:51 +08:00
}
2023-11-08 17:26:59 +08:00
/// <summary>
2025-05-12 19:05:13 +08:00
/// 修改组件打印状态
2023-11-08 17:26:59 +08:00
/// </summary>
/// <param name="PipelineComponentId"></param>
public static void UpdateIsPrint(string[] PipelineComponentId)
{
var componentsToUpdate = Funs.DB.HJGL_Pipeline_Component
.Where(c => PipelineComponentId.Contains(c.PipelineComponentId));
foreach (var component in componentsToUpdate)
{
component.IsPrint = true;
}
Funs.DB.SubmitChanges();
}
2023-02-20 10:49:51 +08:00
/// <summary>
2025-05-12 19:05:13 +08:00
/// 修改组件生产状态
2023-02-20 10:49:51 +08:00
/// </summary>
/// <param name="pipelineComponentId"></param>
/// <param name="BoxNumber"></param>
public static void UpdateProductionState(string pipelineComponentId, int state, DateTime TaskDate)
{
var q = GetPipelineComponentById(pipelineComponentId);
if (q!=null)
{
q.ProductionState = state;
if (state==2)
{
q.ActEndDate = TaskDate;
}
else if(state==1)
{
if (q.ActStartDate ==null)
{
q.ActStartDate = TaskDate;
}
else
{
if (DateTime.Compare(TaskDate,q.ActStartDate.Value) < 0)
{
q.ActStartDate = TaskDate;
}
}
}
UpdatePipelineComponent(q);
}
2022-09-05 16:36:31 +08:00
}
/// <summary>
2025-05-12 19:05:13 +08:00
/// 根据管线组件Id删除一个管线组件信息
2022-09-05 16:36:31 +08:00
/// </summary>
/// <param name="pipelineId"></param>
public static void DeletePipelineComponent(string pipelineComponentId)
{
Model.SGGLDB db = Funs.DB;
Model.HJGL_Pipeline_Component pipeline = db.HJGL_Pipeline_Component.FirstOrDefault(e => e.PipelineComponentId == pipelineComponentId);
if (pipeline != null)
{
db.HJGL_Pipeline_Component.DeleteOnSubmit(pipeline);
db.SubmitChanges();
}
}
/// <summary>
2025-05-12 19:05:13 +08:00
/// 根据管线组件id删除对应组件
2022-09-05 16:36:31 +08:00
/// </summary>
/// <param name="pipeLineMatId"></param>
public static void DeletePipelineComponentByMatId(string pipeLineMatId)
{
Model.SGGLDB db = Funs.DB;
var mdoel = db.HJGL_Pipeline_Component.Where(e => e.PipeLineMatId == pipeLineMatId);
if (mdoel != null)
{
db.HJGL_Pipeline_Component.DeleteAllOnSubmit(mdoel);
db.SubmitChanges();
}
}
/// <summary>
2025-05-12 19:05:13 +08:00
/// 根据管线组件id删除组件
2022-09-05 16:36:31 +08:00
/// </summary>
/// <param name="pipelineId"></param>
public static void DeletePipelineComponentBypipelineId(string pipelineId)
{
Model.SGGLDB db = Funs.DB;
var mdoel = db.HJGL_Pipeline_Component.Where(e => e.PipelineId == pipelineId);
if (mdoel != null)
{
db.HJGL_Pipeline_Component.DeleteAllOnSubmit(mdoel);
db.SubmitChanges();
}
}
2023-09-11 11:40:38 +08:00
2022-09-05 16:36:31 +08:00
/// <summary>
/// 获取已经验收的预制组件
/// </summary>
2023-09-11 11:40:38 +08:00
/// <param name="projectId"></param>
/// <param name="pipelineCode"></param>
/// <param name="pipelineComponentCode"></param>
2022-09-05 16:36:31 +08:00
/// <returns></returns>
2023-09-11 11:40:38 +08:00
public static List<HJGL_Pipeline_Component> GetAcceptedPipelineComponent(string projectId, string pipelineCode,
string pipelineComponentCode,string flowingSection)
2022-09-05 16:36:31 +08:00
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.HJGL_Pipeline_Component
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
2024-11-06 09:59:54 +08:00
where y.ProjectId.Contains(projectId) && x.State.Equals(State1) &&
2023-09-11 11:40:38 +08:00
(string.IsNullOrEmpty(pipelineCode) || y.PipelineCode.Contains(pipelineCode)) &&
(string.IsNullOrEmpty(pipelineComponentCode) || x.PipelineComponentCode.Contains(pipelineComponentCode)) &&
(string.IsNullOrEmpty(flowingSection) || y.FlowingSection.Contains(flowingSection))
2022-09-05 16:36:31 +08:00
select x).ToList();
return q;
2022-10-19 15:49:56 +08:00
}
public static List<Model.HJGL_Pipeline_Component> GetComponentByPipelineId(string PipelineId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.HJGL_Pipeline_Component
where x.PipelineId == PipelineId
select x).OrderBy(x=>x.PlanStartDate).ToList();
return q;
2022-09-05 16:36:31 +08:00
}
2023-09-11 11:40:38 +08:00
///// <summary>
///// 管线下拉框
///// </summary>
///// <param name="dropName">下拉框名字</param>
///// <param name="isShowPlease">是否显示请选择</param>
//public static void InitPipelineDownList(FineUIPro.DropDownList dropName,string projectid, string pipelineCode,
// string pipelineComponentCode, bool isShowPlease)
//{
// dropName.DataValueField = "PipelineComponentId";
// dropName.DataTextField = "PipelineComponentCode";
// dropName.DataSource = GetAcceptedPipelineComponent(projectid, pipelineCode, pipelineComponentCode);
// dropName.DataBind();
// if (isShowPlease)
// {
// Funs.FineUIPleaseSelect(dropName);
// }
//}
2022-09-23 22:29:48 +08:00
public static void InitMainItemDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.DataValueField = "Value";
dropName.DataTextField = "Text";
dropName.DataSource = GetState();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
2023-02-20 10:49:51 +08:00
public static void InitMainItemDownProductionStateList(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.DataValueField = "Value";
dropName.DataTextField = "Text";
dropName.DataSource = GetProductionState();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
2022-09-05 16:36:31 +08:00
}
2023-11-08 17:26:59 +08:00
2022-09-05 16:36:31 +08:00
}