public string FlowIEChartPlan(IEPlanManagerVM ent) { var items = flowChartMasterRepository.UpdateIEPlan(ent.Detail_UID, ent.date, ent.ShiftTimeID); int i = 0; foreach (var item in items) { i++; // item.ShiftTimeID = int.Parse(ent.ShiftTimeID.ToString()); if (Week(item.IE_TargetDate) == "星期一") { item.IE_TargetEfficacy = int.Parse(ent.MondayIE_TargetEfficacy.ToString()); item.IE_DeptHuman = int.Parse(ent.MondayIE_DeptHuman.ToString()); flowChartIEMgDataRepository.Update(item); } if (Week(item.IE_TargetDate) == "星期二") { item.IE_TargetEfficacy = int.Parse(ent.TuesdayIE_TargetEfficacy.ToString()); item.IE_DeptHuman = int.Parse(ent.TuesdayIE_DeptHuman.ToString()); flowChartIEMgDataRepository.Update(item); } if (Week(item.IE_TargetDate) == "星期三") { item.IE_TargetEfficacy = int.Parse(ent.WednesdayIE_TargetEfficacy.ToString()); item.IE_DeptHuman = int.Parse(ent.WednesdayIE_DeptHuman.ToString()); flowChartIEMgDataRepository.Update(item); } if (Week(item.IE_TargetDate) == "星期四") { item.IE_TargetEfficacy = int.Parse(ent.ThursdayIE_TargetEfficacy.ToString()); item.IE_DeptHuman = int.Parse(ent.ThursdayIE_DeptHuman.ToString()); flowChartIEMgDataRepository.Update(item); } if (Week(item.IE_TargetDate) == "星期五") { item.IE_TargetEfficacy = int.Parse(ent.FridayIE_TargetEfficacy.ToString()); item.IE_DeptHuman = int.Parse(ent.FridayIE_DeptHuman.ToString()); flowChartIEMgDataRepository.Update(item); } if (Week(item.IE_TargetDate) == "星期六") { item.IE_TargetEfficacy = int.Parse(ent.SaterdayIE_TargetEfficacy.ToString()); item.IE_DeptHuman = int.Parse(ent.SaterdayIE_DeptHuman.ToString()); flowChartIEMgDataRepository.Update(item); } if (Week(item.IE_TargetDate) == "星期日") { item.IE_TargetEfficacy = int.Parse(ent.SundayIE_TargetEfficacy.ToString()); item.IE_DeptHuman = int.Parse(ent.SundayIE_DeptHuman.ToString()); flowChartIEMgDataRepository.Update(item); } } unitOfWork.Commit(); return("SUCCESS"); }