Example #1
0
        public JObject UpdateSkillGroup(HttpContext context)
        {
            JObject resultObj   = new JObject();
            int     groupId     = Convert.ToInt32(context.Request["id"]);
            string  skillIds    = context.Request["skillIds"];
            String  groupName   = context.Request["groupName"];
            String  Description = context.Request["Description"];

            try
            {
                UserDefinedClasses.SkillGroup skillGroupEntity = new UserDefinedClasses.SkillGroup();
                skillGroupEntity.Id          = groupId;
                skillGroupEntity.Name        = groupName;
                skillGroupEntity.Description = Description;
                skillGroupEntity.AccountId   = accountId;
                skillGroupEntity.AgentId     = agentId;
                Press3.BusinessRulesLayer.SkillGroup skillObj = new Press3.BusinessRulesLayer.SkillGroup();
                resultObj = skillObj.UpdateSkillGroup(MyConfig.MyConnectionString, skillIds, skillGroupEntity);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
            }
            return(resultObj);
        }
Example #2
0
        public JObject GetSkillGroup(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.SkillGroup skillObj = new Press3.BusinessRulesLayer.SkillGroup();
                resultObj = skillObj.GetSkillGroup(MyConfig.MyConnectionString, accountId);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
            }
            return(resultObj);
        }
Example #3
0
        public JObject DeleteSkillGroup(HttpContext context)
        {
            JObject resultObj = new JObject();
            int     groupId   = Convert.ToInt32(context.Request["groupId"]);

            try
            {
                UserDefinedClasses.SkillGroup skillGroupEntity = new UserDefinedClasses.SkillGroup();
                skillGroupEntity.Id = groupId;
                Press3.BusinessRulesLayer.SkillGroup skillObj = new Press3.BusinessRulesLayer.SkillGroup();
                resultObj = skillObj.DeleteSkillGroup(MyConfig.MyConnectionString, skillGroupEntity, accountId);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
            }
            return(resultObj);
        }
Example #4
0
        public JObject Create(HttpContext context)
        {
            JObject resultObj   = new JObject();
            string  Name        = context.Request["GroupName"];
            string  ids         = context.Request["skillIds"];
            string  Description = context.Request["Description"];

            try
            {
                UserDefinedClasses.SkillGroup skillGroupEntity = new UserDefinedClasses.SkillGroup();
                skillGroupEntity.AccountId   = accountId;
                skillGroupEntity.AgentId     = agentId;
                skillGroupEntity.Name        = Name;
                skillGroupEntity.Description = Description;
                Press3.BusinessRulesLayer.SkillGroup skillObj = new Press3.BusinessRulesLayer.SkillGroup();
                resultObj = skillObj.Create(MyConfig.MyConnectionString, skillGroupEntity, ids);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
            }
            return(resultObj);
        }