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");
        }
Example #2
0
        public List <SP_GetAllHeaderByJobID_Result> getAllHeader()
        {
            PSESEntities db = new PSESEntities();

            return(db.SP_GetAllHeaderByJobID().ToList());
        }