1
This commit is contained in:
@@ -43,6 +43,7 @@ namespace BLL
|
||||
InOutPlanMasterId = x.InOutPlanMasterId,
|
||||
PipelineComponentId = x.PipelineComponentId,
|
||||
MaterialCode = x.MaterialCode,
|
||||
HeatNo = x.HeatNo,
|
||||
PlanNum = x.PlanNum,
|
||||
ActNum = x.ActNum,
|
||||
PipelineComponentCode = y.PipelineComponentCode,
|
||||
@@ -108,13 +109,27 @@ namespace BLL
|
||||
public static void AddList(IEnumerable<Model.Tw_InOutPlanDetail> list, string inoutPlanMasterId)
|
||||
{
|
||||
int sortIndex = 1;
|
||||
List<Model.Tw_InOutPlanDetail> details = new List<Model.Tw_InOutPlanDetail>();
|
||||
foreach (var item in list)
|
||||
{
|
||||
item.Id = SQLHelper.GetNewID();
|
||||
item.SortIndex = sortIndex;
|
||||
item.InOutPlanMasterId = inoutPlanMasterId;
|
||||
Add(item);
|
||||
Model.Tw_InOutPlanDetail table = new Model.Tw_InOutPlanDetail
|
||||
{
|
||||
Id = SQLHelper.GetNewID(),
|
||||
InOutPlanMasterId = inoutPlanMasterId,
|
||||
PipelineComponentId = item.PipelineComponentId,
|
||||
MaterialCode = item.MaterialCode,
|
||||
PlanNum = item.PlanNum,
|
||||
ActNum = item.ActNum,
|
||||
SortIndex = sortIndex,
|
||||
HeatNo = item.HeatNo
|
||||
};
|
||||
sortIndex++;
|
||||
details.Add(table);
|
||||
}
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
db.Tw_InOutPlanDetail.InsertAllOnSubmit(details);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void Update(Model.Tw_InOutPlanDetail newtable)
|
||||
|
||||
Reference in New Issue
Block a user