public void insertHeader(tblHeader Header) { PSESEntities db = new PSESEntities(); var a = db.SP_InsertHeader(Header.Parent, Header.Text, Header.Text_Eng, Header.Alias, Header.H_Level, 0, Header.Text_Language).FirstOrDefault(); db.SP_InsertHeaderPosition(Header.PositionNo, a.H_id); if (Header.H_Level == 1) { db.SP_InsertHeaderJob(Header.PositionNo, Convert.ToInt32(a.H_id)); } }
public void UpdateApproveData(tblApprove ap) { PSESEntities db = new PSESEntities(); // tblApprove tmp = GetAllApprove().Where(a => a.ID == ap.ID).FirstOrDefault(); int number = (int)ap.ApproveState; if (ap.GM + ap.HR + ap.PM + ap.ST == 4) { number = 2; } db.SP_UpdateApprove(number, ap.ID, ap.HR, ap.GM, ap.PM, ap.ST); }
public void UpdateScoreData(int EvaID, int point, int H_ID, string comment) { PSESEntities db = new PSESEntities(); if (H_ID >= 0) { db.SP_UpdateData(EvaID, point, H_ID, comment); } else { db.SP_UpdateAdditional(EvaID, point, (-1) * H_ID, comment); } }
public void DeleteHeader(int H_ID) { PSESEntities db = new PSESEntities(); if (H_ID > 0) { db.SP_DeleteHeader(H_ID); } else { db.SP_DeleteHeaderAdditional(H_ID * (-1)); } }
public void EmployeeActivityLog(string EmployeeID , string Activity) { using (PSESEntities db = new PSESEntities()) { using (TransactionScope trans = new TransactionScope()) { try { //db.sp_ADM001_EmployeeActivityLog(EmployeeID, Activity); trans.Complete(); } catch (Exception e) { throw; } } } }
public string createForm([FromBody] JObject Data) { tblEvaluation Eva = new tblEvaluation(); Eva.EmployeeNO = Data["EmployeeNO"].ToString(); Eva.EvaluatorNO = Data["EvaluatorNO"].ToString(); Eva.Job_ID = Convert.ToInt32(Data["JobID"].ToString()); Eva.ProjectNO = Data["ProjectNO"].ToString(); var svc = ServiceContainer.GetService <PesWeb.Service.Modules.FormManage>(); PSESEntities db = new PSESEntities(); List <SP_GetAllHeaderByJobID_Result> AllHeader = db.SP_GetAllHeaderByJobID().Where(a => a.JobID == Convert.ToInt32(Data["JobID"].ToString())).ToList(); int EvaID = svc.createForm(Eva); tblScore score = new tblScore(); foreach (SP_GetAllHeaderByJobID_Result temp in AllHeader) { score.Eva_ID = EvaID; score.H3_ID = temp.H3_ID; svc.InsertScore(score); } return("Success"); }
public List <tblPart2Master> getRole() { PSESEntities db = new PSESEntities(); return(db.tblPart2Master.ToList()); }
public SP_InsertEvaluation_Result InsertEvaData(tblEvaluation eva) { PSESEntities db = new PSESEntities(); return(db.SP_InsertEvaluation(eva.ProjectNO, eva.EvaluatorNO, eva.EmployeeNO, eva.Job_ID, eva.period, eva.PeriodID, eva.StartEvaDate, eva.FinishEvaDate, eva.ProjectCode).FirstOrDefault()); }
public List <tblEvaluation> getEvaData() { PSESEntities db = new PSESEntities(); return(db.tblEvaluation.ToList()); }
public List <SP_GetEmployeeListByPeriodID_Result> getEmpListByPeriod(int PeriodID, string evaluatorID) { PSESEntities db = new PSESEntities(); return(db.SP_GetEmployeeListByPeriodID(PeriodID, evaluatorID).ToList()); }
public void UpdateEvaluationData(int EvaID, int PositionNo) { PSESEntities db = new PSESEntities(); db.SP_UpdateEvaluationData(EvaID, PositionNo); }
public void DeleteEva(int EvaID) { PSESEntities db = new PSESEntities(); db.SP_DeleteEva(EvaID); }
//GG public List <tblEmployee> getEmployees() { PSESEntities db = new PSESEntities(); return(db.tblEmployee.ToList()); }
public List <tblApproveStatus> GetApproveStatus() { PSESEntities db = new PSESEntities(); return(db.tblApproveStatus.ToList()); }
public void UpdateApproveData(tblApproveStatus aps) { PSESEntities db = new PSESEntities(); db.SP_UpdateAprroveData(aps.Status, aps.ID); }
public void insertApproveStatus(tblApproveStatus aps) { PSESEntities db = new PSESEntities(); db.SP_InsertApproveFlow(aps.Status, aps.FlowOrder, aps.ApproveID, aps.Comment, aps.Name, aps.EmployeeNO); }
public List <tblFlowMaster> getAllFlow() { PSESEntities db = new PSESEntities(); return(db.tblFlowMaster.ToList()); }
public List <tblPosition> getPosition() { PSESEntities db = new PSESEntities(); return(db.tblPosition.ToList()); }
public List <tblApprove> getApprove() { PSESEntities db = new PSESEntities(); return(db.tblApprove.ToList()); }
public List <Period> GetPeriod() { PSESEntities db = new PSESEntities(); return(db.Period.ToList()); }
public List <tblProject> getProject() { PSESEntities db = new PSESEntities(); return(db.tblProject.ToList()); }
public List <tblEvaluation> GetAllEvaluation() { PSESEntities db = new PSESEntities(); return(db.tblEvaluation.ToList()); }
public void DeleteScore(int ScoreID) { PSESEntities db = new PSESEntities(); db.SP_DeleteScore(ScoreID); }
public void UpdateGM(int ID, string EmployeeNo, string name) { PSESEntities db = new PSESEntities(); db.SP_UpdateApproveStatusFlow(ID, EmployeeNo, name); }
public void DeleteApprove(int EvaID) { PSESEntities db = new PSESEntities(); db.SP_DeleteApproveByEvaID(EvaID); }
public List <tblProjectMember> getProjectMember() { PSESEntities db = new PSESEntities(); return(db.tblProjectMember.ToList()); }
public List <tblOrganization> getOrganization() { PSESEntities db = new PSESEntities(); return(db.tblOrganization.ToList()); }
public void updateEvaluationStatus(int evaID, int status) { PSESEntities db = new PSESEntities(); db.SP_UpdateEvaluationStatus(evaID, status); }
public void UpdateDataTable(string Data, int id) { PSESEntities db = new PSESEntities(); db.SP_UpdateDataTable(Data, id); }
public SP_InsertApproveState_Result insertApprove(tblApprove ap) { PSESEntities db = new PSESEntities(); return(db.SP_InsertApproveState(ap.EvaID, ap.Position, ap.PositionID, ap.ProjectCode, ap.Role, ap.Name, ap.EmployeeNo).FirstOrDefault()); }