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));
            }
        }
Exemple #2
0
        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));
            }
        }
Exemple #5
0
 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");
        }
Exemple #7
0
        public List <tblPart2Master> getRole()
        {
            PSESEntities db = new PSESEntities();

            return(db.tblPart2Master.ToList());
        }
Exemple #8
0
        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());
        }
Exemple #9
0
        public List <tblEvaluation> getEvaData()
        {
            PSESEntities db = new PSESEntities();

            return(db.tblEvaluation.ToList());
        }
Exemple #10
0
        public List <SP_GetEmployeeListByPeriodID_Result> getEmpListByPeriod(int PeriodID, string evaluatorID)
        {
            PSESEntities db = new PSESEntities();

            return(db.SP_GetEmployeeListByPeriodID(PeriodID, evaluatorID).ToList());
        }
Exemple #11
0
        public void UpdateEvaluationData(int EvaID, int PositionNo)
        {
            PSESEntities db = new PSESEntities();

            db.SP_UpdateEvaluationData(EvaID, PositionNo);
        }
Exemple #12
0
        public void DeleteEva(int EvaID)
        {
            PSESEntities db = new PSESEntities();

            db.SP_DeleteEva(EvaID);
        }
Exemple #13
0
        //GG
        public List <tblEmployee> getEmployees()
        {
            PSESEntities db = new PSESEntities();

            return(db.tblEmployee.ToList());
        }
Exemple #14
0
        public List <tblApproveStatus> GetApproveStatus()
        {
            PSESEntities db = new PSESEntities();

            return(db.tblApproveStatus.ToList());
        }
Exemple #15
0
        public void UpdateApproveData(tblApproveStatus aps)
        {
            PSESEntities db = new PSESEntities();

            db.SP_UpdateAprroveData(aps.Status, aps.ID);
        }
Exemple #16
0
        public void insertApproveStatus(tblApproveStatus aps)
        {
            PSESEntities db = new PSESEntities();

            db.SP_InsertApproveFlow(aps.Status, aps.FlowOrder, aps.ApproveID, aps.Comment, aps.Name, aps.EmployeeNO);
        }
Exemple #17
0
        public List <tblFlowMaster> getAllFlow()
        {
            PSESEntities db = new PSESEntities();

            return(db.tblFlowMaster.ToList());
        }
Exemple #18
0
        public List <tblPosition> getPosition()
        {
            PSESEntities db = new PSESEntities();

            return(db.tblPosition.ToList());
        }
Exemple #19
0
        public List <tblApprove> getApprove()
        {
            PSESEntities db = new PSESEntities();

            return(db.tblApprove.ToList());
        }
Exemple #20
0
        public List <Period> GetPeriod()
        {
            PSESEntities db = new PSESEntities();

            return(db.Period.ToList());
        }
Exemple #21
0
        public List <tblProject> getProject()
        {
            PSESEntities db = new PSESEntities();

            return(db.tblProject.ToList());
        }
Exemple #22
0
        public List <tblEvaluation> GetAllEvaluation()
        {
            PSESEntities db = new PSESEntities();

            return(db.tblEvaluation.ToList());
        }
Exemple #23
0
        public void DeleteScore(int ScoreID)
        {
            PSESEntities db = new PSESEntities();

            db.SP_DeleteScore(ScoreID);
        }
Exemple #24
0
        public void UpdateGM(int ID, string EmployeeNo, string name)
        {
            PSESEntities db = new PSESEntities();

            db.SP_UpdateApproveStatusFlow(ID, EmployeeNo, name);
        }
Exemple #25
0
        public void DeleteApprove(int EvaID)
        {
            PSESEntities db = new PSESEntities();

            db.SP_DeleteApproveByEvaID(EvaID);
        }
Exemple #26
0
        public List <tblProjectMember> getProjectMember()
        {
            PSESEntities db = new PSESEntities();

            return(db.tblProjectMember.ToList());
        }
Exemple #27
0
        public List <tblOrganization> getOrganization()
        {
            PSESEntities db = new PSESEntities();

            return(db.tblOrganization.ToList());
        }
Exemple #28
0
        public void updateEvaluationStatus(int evaID, int status)
        {
            PSESEntities db = new PSESEntities();

            db.SP_UpdateEvaluationStatus(evaID, status);
        }
Exemple #29
0
        public void UpdateDataTable(string Data, int id)
        {
            PSESEntities db = new PSESEntities();

            db.SP_UpdateDataTable(Data, id);
        }
Exemple #30
0
        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());
        }