Beispiel #1
0
 public JObject DeleteSkillGroup(string connectionString, UDC.SkillGroup skillGroupEntity, int accountId)
 {
     try
     {
         if (skillGroupEntity.Id == 0)
         {
             _helper.CreateProperty(UDC.Label.SUCCESS, false);
             _helper.CreateProperty(UDC.Label.MESSAGE, "GroupId is mandatory");
         }
         else
         {
             DataAccessLayer.SkillGroup skillObj = new DataAccessLayer.SkillGroup(connectionString);
             System.Data.DataSet        ds       = skillObj.DeleteSkillGroup(skillGroupEntity, accountId);
             if (ds.IsNull())
             {
                 _helper.CreateProperty(UDC.Label.SUCCESS, false);
                 _helper.CreateProperty(UDC.Label.MESSAGE, skillObj.ErrorMessage);
             }
             else
             {
                 _helper.ParseDataSet(ds);
             }
         }
     }
     catch (Exception e)
     {
         Utilities.Logger.Error(e.ToString());
         _helper.InitializeResponseVariables();
         _helper.CreateProperty(UDC.Label.SUCCESS, false);
         _helper.CreateProperty(UDC.Label.MESSAGE, e.Message);
     }
     return(_helper.GetResponse());
 }
Beispiel #2
0
        public DataSet GetStudioSkillGroups(String connection, int studioId)
        {
            DataSet ds = new DataSet();

            try
            {
                DataAccessLayer.SkillGroup skillObj = new DataAccessLayer.SkillGroup(connection);
                ds = skillObj.GetStudioSkillGroups(studioId);
            }
            catch (Exception ex)
            {
                Logger.Error("Exception In BAL.GetStudioSkillGroups " + ex.ToString());
            }
            return(ds);
        }
Beispiel #3
0
 public JObject Create(string connectionString, UDC.SkillGroup skillGroupEntity, string ids)
 {
     try
     {
         if (skillGroupEntity.AccountId == 0)
         {
             _helper.CreateProperty(UDC.Label.SUCCESS, false);
             _helper.CreateProperty(UDC.Label.MESSAGE, "AccountId is mandatory");
         }
         else if (skillGroupEntity.Name == null || skillGroupEntity.Name.Trim().Length == 0)
         {
             _helper.CreateProperty(UDC.Label.SUCCESS, false);
             _helper.CreateProperty(UDC.Label.MESSAGE, "Group name is mandatory");
         }
         else
         {
             DataTable table = GetTable(ids);
             DataAccessLayer.SkillGroup skillObj = new DataAccessLayer.SkillGroup(connectionString);
             System.Data.DataSet        ds       = skillObj.Create(skillGroupEntity, table);
             if (ds.IsNull())
             {
                 _helper.CreateProperty(UDC.Label.SUCCESS, false);
                 _helper.CreateProperty(UDC.Label.MESSAGE, skillObj.ErrorMessage);
             }
             else
             {
                 _helper.ParseDataSet(ds);
             }
         }
     }
     catch (Exception e)
     {
         Utilities.Logger.Error(e.ToString());
         _helper.InitializeResponseVariables();
         _helper.CreateProperty(UDC.Label.SUCCESS, false);
         _helper.CreateProperty(UDC.Label.MESSAGE, e.Message);
     }
     return(_helper.GetResponse());
 }