void CheckPointSetForm_Loaded(object sender, RoutedEventArgs e) { if (FormType == FormTypes.New) { PointSet = new T_HR_CHECKPOINTSET(); pointSet.CHECKPOINTSETID = Guid.NewGuid().ToString(); pointSet.T_HR_CHECKPROJECTSET = ProjectSet; pointSet.CHECKEMPLOYEETYPE = "0"; CheckPointLevelSetAdd(); } else { client.GetCheckPointSetByIDAsync(projectID); } }
private void SetEntityValue() { foreach (var ent in ProjectSet) { foreach (var tempEnt in ent.PointList) { if (FormType == FormTypes.New) { T_HR_ASSESSMENTFORMDETAIL temp = new T_HR_ASSESSMENTFORMDETAIL(); temp.ASSESSMENTFORMDETAILID = Guid.NewGuid().ToString(); T_HR_CHECKPOINTSET ents = new T_HR_CHECKPOINTSET(); ents.CHECKPOINTSETID = tempEnt.CheckPointSetID; temp.T_HR_CHECKPOINTSET = ents; temp.T_HR_ASSESSMENTFORMMASTER = FormMaster; temp.CREATEDATE = DateTime.Now; temp.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; temp.SECONDSCORE = tempEnt.SecondScore; temp.FIRSTSCORE = tempEnt.FirstScore; DetailList.Add(temp); } else { foreach (var temp in DetailList) { if (tempEnt.CheckPointSetID == temp.T_HR_CHECKPOINTSET.CHECKPOINTSETID) { temp.SECONDSCORE = tempEnt.SecondScore; temp.FIRSTSCORE = tempEnt.FirstScore; temp.UPDATEDATE = DateTime.Now; temp.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; } } } } } }
public void CheckPointSetUpdate(T_HR_CHECKPOINTSET entity, List<T_HR_CHECKPOINTLEVELSET> levelEntitys) { using (CheckPointSetBLL pointBll = new CheckPointSetBLL()) { pointBll.CheckPointSetUpdate(entity); CheckPointLevelSetBLL levelBll = new CheckPointLevelSetBLL(); levelBll.CheckPointLevelSetUpdate(levelEntitys); } }