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; } }
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; } }
public GetAccessRightsResult GetAccessRights(string userId, BTSS.Common.Core.Module module) { try { return ctx.GetAccessRights(userId, module.ToString()).ToList<GetAccessRightsResult>().FirstOrDefault(); } catch (Exception) { throw; } }