private async Task Save() { LoggType dto = BuildDto(); await _customFieldService.Save(dto); await PopAsync(); }
public void AddSelectedLoggType(LoggType loggType)//todo change to store only key { if (SelectedLoggTypeList.All(l => l.Key != loggType.Key)) { SelectedLoggTypeList.Add(loggType); SelectedLoggTypeList.Save(FILE_SELECTED_LOGGTYPEIDS); } }
public void SaveLoggType(LoggType loggType) { var index = LoggTypeList.FindIndex(x => x.Key == loggType.Key); LoggTypeList[index] = loggType; LoggTypeList.Where(a => a.GroupId != 100).ToList().SaveToLocalStorage(FILE_LOGGTYPER); }
//private async Task Delete() //{ // var ok = await _huntFactory.DeleteCustomField(ID, ImagePath); // if (ok) // { // await PopAsync(); // } //} public void SetState(LoggType dto, bool selected) { _dto = dto ?? new LoggType(); ID = _dto.Key; Name = _dto.Navn; Description = _dto.Beskrivelse; GroupId = _dto.GroupId; Title = ID == null ? "Nytt felt" : _dto.Navn; Selected = selected; }
public void LoggTypeSelected(LoggType loggType) { loggType.Selected = !loggType.Selected; if (loggType.Selected) { App.Database.AddSelectedLoggType(loggType); } else { App.Database.RemoveSelectedLoggType(loggType.Key); } BindData(); }
/// <summary> /// Creates a new Instance of <see cref="LoggInfo"/> /// With the <see cref="Date"/> to Current Date /// </summary> /// <param name="Text">The error message</param> /// <param name="Type">The <see cref="LoggType"/> of this error</param> public LoggInfo(string Text, LoggType Type) : this(Text) { this.Type = Type; }
public LoggInfo(DateTime date, string text, LoggType Type, Type InnerType, string InnerMessage, string InnerStack) : this(text, Type) { this.Date = date; this.InnerException = new InnerException(); this.InnerException.ExceptionType = InnerType; this.InnerException.Message = InnerMessage; this.InnerException.StackTrace = InnerStack; }
/// <summary> /// Creates a new Instance of <see cref="LoggInfo"/> /// With the <see cref="Date"/> set to the Current Date /// </summary> /// <param name="Exception">The Exception</param> /// <param name="Type">The <see cref="LoggType"/> of this Exception</param> public LoggInfo(Exception Exception, LoggType Type) : this(Exception) { this.Type = Type; }
/// <summary> /// Creates a new Instance of <see cref="LoggInfo"/> /// With the <see cref="Date"/> to Current Date /// </summary> /// <param name="Text">The error message</param> /// <param name="Type">The <see cref="LoggType"/> of this error</param> /// <param name="InnerException">The InnerException of this Error</param> public LoggInfo(string Text, LoggType Type, Exception InnerException) : this(Text, Type) { if (InnerException != null) { this.InnerException = new InnerException(); this.InnerException.ExceptionType = InnerException.GetType(); this.InnerException.Message = InnerException.Message; this.InnerException.StackTrace = InnerException.StackTrace; } }
/// <summary> /// Logs a new line of text to a text file /// </summary> /// <param name="type">The type of the error to log</param> /// <param name="text">The error message to log.</param> /// <param name="innerException">The InnerException of this error</param> public override void Log(LoggType type, string text, Exception InnerException = null) { LoggInfo loggInfo = new LoggInfo(text, type, InnerException); Log(loggInfo); }
/// <summary> /// Logs a new line of text /// </summary> /// <param name="type">The type of the error to log</param> /// <param name="text">The error message to log.</param> /// <param name="innerException">The InnerException of this error</param> public abstract void Log(LoggType type, string text, Exception innerException = null);