Ejemplo n.º 1
0
        //public bool SaveSearchEmployeeByName(Details model, int? SkillID, string Rating, int? loggedInUserEmployeeCode, string UpdatedBy)
        //{
        //    ObjectParameter Output = new ObjectParameter("Output", typeof(int));
        //    //if (model.ID == null)
        //    //{
        //    //    dbContext.AddUpdateSearchEmployeeByName_SP(0, loggedInUserEmployeeCode, "INSERT", 0, SkillID, Rating, UpdatedBy, DateTime.Now, Output);
        //    //}
        //    //else
        //    //{
        //    //    dbContext.AddUpdateSearchEmployeeByName_SP(model.ID, loggedInUserEmployeeCode, "UPDATE", 0, 0, Rating, UpdatedBy, DateTime.Now, Output);
        //    //}
        //    dbContext.AddUpdateSearchEmployeeByName_SP(0, loggedInUserEmployeeCode, "INSERT", 0, SkillID, Rating, UpdatedBy, DateTime.Now, Output);
        //    //dbContext.AddUpdateSearchEmployeeByName_SP(0, loggedInUserEmployeeCode, "INSERT", 0, SkillID, "", UpdatedBy, DateTime.Now, Output);
        //    bool status = Convert.ToBoolean(Output.Value);
        //    Output.Value = 0;
        //    return status;

        //}
        public bool DeleteSearchByEmployeeName(IList <string> id)
        {
            SkillMatrixDal dal = new SkillMatrixDal();

            try
            {
                bool status = false;
                foreach (string InDId in id)
                {
                    if (InDId != "")
                    {
                        ObjectParameter Result = new ObjectParameter("Result", typeof(int));
                        int             Id     = Convert.ToInt32(InDId);
                        dbContext.DeleteSearchByEmployeeName(Id, dal.GetCurrentUserLoggedOn(), Result);
                        status = Convert.ToBoolean(Result.Value);
                    }
                }

                return(status);
            }
            catch (Exception)
            {
                throw;
            }
            //return true;
        }
Ejemplo n.º 2
0
        public bool SaveSkillResourceDetail(ConfigurationSkillMatrix model)
        {
            WSEMDBEntities dbContext      = new WSEMDBEntities();
            SkillMatrixDal sd             = new SkillMatrixDal();
            int            ResourcePoolID = model.ResourcePoolId;
            string         description    = model.Description;

            ObjectParameter ToolSkillID = new ObjectParameter("ToolSkillID", typeof(int));
            ObjectParameter Output      = new ObjectParameter("Result", typeof(int));
            bool            status      = false;

            if (model.ToolId != null)
            {
                var Temp = dbContext.AddUpdateSkillToolDetails_SP(model.ToolId, ResourcePoolID, sd.GetCurrentUserLoggedOn(), description.ToLower().Trim(), "EDIT", Output, ToolSkillID);
                foreach (var Te in Temp)
                {
                    status = Convert.ToBoolean(Te.Column1);
                    break;
                }
            }
            else
            {
                var Temp = dbContext.AddUpdateSkillToolDetails_SP(model.ToolId, ResourcePoolID, sd.GetCurrentUserLoggedOn(), description.ToLower().Trim(), "INSERT", Output, ToolSkillID);
                foreach (var Te in Temp)
                {
                    status = Convert.ToBoolean(Te.Column1);
                    break;
                }
            }

            //status = Convert.ToBoolean(Output.Value);
            return(status);
        }
Ejemplo n.º 3
0
        public bool DeleteSkill(int id)
        {
            try
            {
                WSEMDBEntities  dbContext = new WSEMDBEntities();
                bool            status    = false;
                ObjectParameter Result    = new ObjectParameter("Result", typeof(int));
                SkillMatrixDal  dal       = new SkillMatrixDal();
                dbContext.DeleteSearchByEmployeeName(id, dal.GetCurrentUserLoggedOn(), Result);
                status = Convert.ToBoolean(Result.Value);

                return(status);
            }
            catch (Exception)
            {
                throw;
            }
        }