提交代码
This commit is contained in:
@@ -39,6 +39,7 @@ namespace BLL
|
||||
newBase.WorkTeam = Base.WorkTeam;
|
||||
newBase.CompileMan = Base.CompileMan;
|
||||
newBase.CompileDate = Base.CompileDate;
|
||||
newBase.State = Base.State;
|
||||
|
||||
db.QuantityManagement_Base.InsertOnSubmit(newBase);
|
||||
db.SubmitChanges();
|
||||
@@ -62,6 +63,7 @@ namespace BLL
|
||||
newBase.Amount = Base.Amount;
|
||||
newBase.WorkTeam = Base.WorkTeam;
|
||||
newBase.CompileMan = Base.CompileMan;
|
||||
newBase.State = Base.State;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
@@ -108,7 +110,7 @@ namespace BLL
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q = (from x in db.QuantityManagement_Base
|
||||
where x.DrawingId == drawingId
|
||||
where x.DrawingId == drawingId && x.State == BLL.Const.Base_Complete
|
||||
orderby x.Part
|
||||
select x.Part).Distinct().ToList();
|
||||
ListItem[] list = new ListItem[q.Count()];
|
||||
@@ -147,10 +149,47 @@ namespace BLL
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.QuantityManagement_Base
|
||||
where x.DrawingId == drawingId && x.Part == part
|
||||
where x.DrawingId == drawingId && x.Part == part && x.State == BLL.Const.Base_Complete
|
||||
orderby x.ProjectContent
|
||||
select x).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public static void Init(FineUIPro.DropDownList dropName, string state, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Value";
|
||||
dropName.DataTextField = "Text";
|
||||
dropName.DataSource = GetDHandleTypeByState(state);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据状态选择下一步办理类型
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetDHandleTypeByState(string state)
|
||||
{
|
||||
if (state == Const.Base_Compile || state == Const.Base_ReCompile) //无是否同意
|
||||
{
|
||||
ListItem[] lis = new ListItem[1];
|
||||
lis[0] = new ListItem("审核", Const.Base_Audit1);
|
||||
return lis;
|
||||
}
|
||||
else if (state == Const.Base_Audit1)//有是否同意
|
||||
{
|
||||
ListItem[] lis = new ListItem[2];
|
||||
lis[0] = new ListItem("审批完成", Const.Base_Complete);//是 加载
|
||||
lis[1] = new ListItem("重新编制", Const.Base_ReCompile);//否加载
|
||||
return lis;
|
||||
}
|
||||
|
||||
else
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user