提交代码
This commit is contained in:
@@ -37,6 +37,7 @@ namespace BLL
|
||||
newDrawing.Major = Drawing.Major;
|
||||
newDrawing.AcceptDate = Drawing.AcceptDate;
|
||||
newDrawing.CompletionStatus = Drawing.CompletionStatus;
|
||||
newDrawing.CompletionStatus2 = Drawing.CompletionStatus2;
|
||||
newDrawing.DutyPerson = Drawing.DutyPerson;
|
||||
newDrawing.Remark = Drawing.Remark;
|
||||
newDrawing.CompileMan = Drawing.CompileMan;
|
||||
@@ -63,6 +64,7 @@ namespace BLL
|
||||
newDrawing.Major = Drawing.Major;
|
||||
newDrawing.AcceptDate = Drawing.AcceptDate;
|
||||
newDrawing.CompletionStatus = Drawing.CompletionStatus;
|
||||
newDrawing.CompletionStatus2 = Drawing.CompletionStatus2;
|
||||
newDrawing.DutyPerson = Drawing.DutyPerson;
|
||||
newDrawing.Remark = Drawing.Remark;
|
||||
newDrawing.CompileMan = Drawing.CompileMan;
|
||||
@@ -102,6 +104,23 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 图纸登记下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitDrawingChangeDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Value";
|
||||
dropName.DataTextField = "Text";
|
||||
dropName.DataSource = GetDrawingChangeListByProjectId(projectId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目Id获取图纸登记下拉选择项
|
||||
/// </summary>
|
||||
@@ -112,11 +131,41 @@ namespace BLL
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q = (from x in db.QuantityManagement_Drawing
|
||||
where x.ProjectId == projectId
|
||||
where x.ProjectId == projectId
|
||||
orderby x.DrawingNo
|
||||
select x).ToList();
|
||||
return q;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目Id获取图纸登记下拉选择项
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetDrawingChangeListByProjectId(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q1 = (from x in db.QuantityManagement_Drawing
|
||||
where x.ProjectId == projectId
|
||||
orderby x.DrawingNo
|
||||
select x).ToList();
|
||||
var q2 = (from x in db.QuantityManagement_Change
|
||||
where x.ProjectId == projectId
|
||||
orderby x.ChangeNo
|
||||
select x).ToList();
|
||||
ListItem[] list = new ListItem[q1.Count() + q2.Count()];
|
||||
for (int i = 0; i < q1.Count(); i++)
|
||||
{
|
||||
list[i] = new ListItem(q1[i].DrawingNo ?? "", q1[i].DrawingId.ToString());
|
||||
}
|
||||
for (int j = q1.Count(); j < q1.Count() + q2.Count(); j++)
|
||||
{
|
||||
list[j] = new ListItem(q2[j - q1.Count()].ChangeNo ?? "", q2[j - q1.Count()].ChangeId.ToString());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user