Пример #1
0
 public static bool IsCodeExist(string originalValue, string currentValue, string table, string field, BTSS.Common.Core.Operation operation)
 { 
     try
     {                
         BTSSContext ctx = new BTSSContext(BTSS.Common.Core.ConnectionString);
         return  ctx.IsCodeExist(originalValue, currentValue, table, field, operation.ToString()).FirstOrDefault().IsExist.Value;
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #2
0
        public object GetValue(BTSS.Common.Core.Preferences preferences)
        {
            try
            { 
                var row = from s in ctx.Preferences
                          where s.Tag == preferences.ToString() 
                          select new { s.Value };

                if (row.Count() > 0 )
                    return row.FirstOrDefault().Value;
                else
                    return "";
                
            }
            catch (Exception)
            {
                throw;
            }
        }
Пример #3
0
Файл: User.cs Проект: m12k/Files
 public GetAccessRightsResult GetAccessRights(string userId, BTSS.Common.Core.Module module)
 {
     try
     {
         return ctx.GetAccessRights(userId, module.ToString()).ToList<GetAccessRightsResult>().FirstOrDefault();
     }
     catch (Exception)
     {
         throw;
     }
 }