Beispiel #1
0
        public ActionResult UpdateJobRoleDetails(int InstanceSubClassificationId)
        {
            var instanceId = Session["InstanceId"];

            GetStateList();
            GetSSCList(instanceId.ToString());
            if (instanceId != null)
            {
                if (InstanceSubClassificationId == 0)
                {
                    ViewData["InstanceSubClassificationId"] = null;
                }
                else
                {
                    JobroleDetailBl objBl = new JobroleDetailBl();
                    SaveJobRoleDO   objDO = new SaveJobRoleDO();
                    objDO = objBl.GetTrainingDetailsById(InstanceSubClassificationId);
                    if (objDO != null)
                    {
                        ViewData["JobRoleDetails"] = objDO;
                    }
                    else
                    {
                        ViewData["JobRoleDetails"] = null;
                        ViewData["InstanceSubClassificationId"] = null;
                    }
                }
            }
            else
            {
            }
            return(View());
        }
Beispiel #2
0
        public JsonResult SaveJobRoleDetails(List <SaveJobRoleDO> SaveJobeRole)
        {
            JsonResult      result       = new JsonResult();
            JobroleDetailBl objBL        = new JobroleDetailBl();
            int             returnStatus = 0;
            SaveJobRoleDO   objDO        = new SaveJobRoleDO();

            foreach (var item in SaveJobeRole)
            {
                objDO.InstanceId = item.InstanceId;
                objDO.InstanceClassificationId     = item.InstanceClassificationId;
                objDO.SubClassificationName        = item.SubClassificationName;
                objDO.SubClassificationDescription = item.SubClassificationDescription;
                objDO.ResultsModeId = item.ResultsModeId;
                objDO.CreatedBy     = item.CreatedBy;
                objDO.CreatedDate   = item.CreatedDate;


                int obj = 0;
                obj = objBL.SaveJobRoleDetail(objDO);
                if (obj == 1)
                {
                    returnStatus = 1;
                }
                else
                {
                    returnStatus = -1;
                }
                result.Data = obj;
            }
            return(result);
        }
Beispiel #3
0
        public SaveJobRoleDO GetTrainingDetailsById(int InstanceSubClassificationId)
        {
            SaveJobRoleDO objDO = new SaveJobRoleDO();

            objDO = objDAL.GetTrainingDetailsById(InstanceSubClassificationId);
            return(objDO);
        }
Beispiel #4
0
        public int SaveJobRoleDetails(SaveJobRoleDO objDO)
        {
            int resultStatus = 0;
            var result       = db.stp_tblJobRole_INSERT_SSC(objDO.InstanceId, objDO.InstanceClassificationId, objDO.SubClassificationName, objDO.SubClassificationDescription, objDO.ResultsModeId, objDO.CreatedBy, DateTime.Now);

            if (result > 0)
            {
                resultStatus = 1;
            }
            else
            {
                resultStatus = result;
            }
            return(resultStatus);
        }
Beispiel #5
0
        public int UpdateJobROleDetails(SaveJobRoleDO objDO)
        {
            var result = db.stp_tblJobRole_UPDATE_SSC(objDO.InstanceId, objDO.InstanceSubClassificationId, objDO.InstanceClassificationId, objDO.SubClassificationName,
                                                      objDO.SubClassificationDescription, objDO.ResultsModeId, objDO.CreatedBy, DateTime.Now);
            var returnStatus = 0;

            if (result != null)
            {
                foreach (var item in result)
                {
                    returnStatus = item.Value;
                }
            }

            return(returnStatus);
        }
Beispiel #6
0
        public SaveJobRoleDO GetTrainingDetailsById(int InstanceSubClassificationId)
        {
            SaveJobRoleDO objDO  = new SaveJobRoleDO();
            var           result = db.STP_tblInstanceSubClassification_GetJobRoleById(InstanceSubClassificationId);

            if (result != null)
            {
                foreach (var item in result)
                {
                    objDO.InstanceId = Convert.ToInt32(item.InstanceId);
                    objDO.InstanceClassificationId     = Convert.ToInt32(item.InstanceClassificationId);
                    objDO.InstanceSubClassificationId  = Convert.ToInt32(item.InstanceSubClassificationId);
                    objDO.SubClassificationName        = item.SubClassificationName;
                    objDO.SubClassificationDescription = item.SubClassificationDescription;
                    objDO.ResultsModeId = Convert.ToInt32(item.ResultsModeId);
                }
            }

            return(objDO);
        }
Beispiel #7
0
        public int UpdateJobRoleDetails(tblInstanceSubClassification obj)
        {
            var           result = (from s in db.tblInstanceSubClassifications where s.InstanceSubClassificationId == obj.InstanceSubClassificationId select s).SingleOrDefault();
            SaveJobRoleDO objNew = new SaveJobRoleDO();

            objNew.InstanceId = Convert.ToInt32(obj.InstanceId);
            objNew.InstanceClassificationId     = Convert.ToInt32(obj.InstanceClassificationId);
            objNew.InstanceSubClassificationId  = Convert.ToInt32(obj.InstanceSubClassificationId);
            objNew.SubClassificationName        = obj.SubClassificationName;
            objNew.SubClassificationDescription = obj.SubClassificationDescription;
            objNew.ResultsModeId = Convert.ToInt32(obj.ResultsModeId);
            if (db.SaveChanges() > 0)
            {
                return(1);
            }
            else
            {
                return(-1);
            }
        }
Beispiel #8
0
 public int UpdateJobROleDetails(SaveJobRoleDO objDO)
 {
     return(objDAL.UpdateJobROleDetails(objDO));
 }
Beispiel #9
0
 public int SaveJobRoleDetail(SaveJobRoleDO objDO)
 {
     return(objDAL.SaveJobRoleDetails(objDO));
 }