Esempio n. 1
0
File: Common.cs Progetto: m12k/Files
 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;
     }
 }
Esempio n. 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;
            }
        }
Esempio n. 3
0
File: User.cs Progetto: 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;
     }
 }