Пример #1
0
        public JObject GetSkills(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Skill skillObj = new Press3.BusinessRulesLayer.Skill();
                resultObj = skillObj.GetSkills(MyConfig.MyConnectionString, accountId);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
            }
            return(resultObj);
        }
Пример #2
0
        public JObject GetSkill(HttpContext context)
        {
            JObject resultObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Skill skillObj = new Press3.BusinessRulesLayer.Skill();
                int skillId = Convert.ToInt32(context.Request["Id"]);
                resultObj = skillObj.GetSkill(MyConfig.MyConnectionString, accountId, skillId);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
            }
            return(resultObj);
        }
Пример #3
0
        public JObject Delete(HttpContext context)
        {
            JObject resultObj = new JObject();
            int     Id        = Convert.ToInt32(context.Request["Id"]);
            string  Name      = context.Request["Name"];

            try
            {
                UserDefinedClasses.Skill skillEntity = new UserDefinedClasses.Skill();
                skillEntity.AccountId = accountId;
                skillEntity.Id        = Id;
                skillEntity.Name      = Name;
                Press3.BusinessRulesLayer.Skill skillObj = new Press3.BusinessRulesLayer.Skill();
                resultObj = skillObj.Delete(MyConfig.MyConnectionString, skillEntity);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
            }
            return(resultObj);
        }
Пример #4
0
        public JObject Create(HttpContext context)
        {
            JObject resultObj   = new JObject();
            string  Name        = context.Request["Name"];
            string  Description = context.Request["Description"];

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