public int UpdateActionUpdateParentWindowActionGridByID(Guid ActionID) { access = new BrienzDataAccess(); BrienzAction GetAction = access.GetActionByActionID(ActionID); GetAction.EndTime = this.EndTime; GetAction.ActionContent = this.DocumentXaml; GetAction.FromResource = this.FromResource; GetAction.Location = this.Location; GetAction.IsAllDayEvent = this.IsAllDayEvent; GetAction.Priority = this.Priority.Content as string; GetAction.StartTime = this.StartTime; GetAction.Subject = this.Subject; return(access.UpdateAction(GetAction)); }
public ActionStructure GetActionByID(Guid ActionID) { access = new BrienzDataAccess(); ActionStructure actStr = new ActionStructure(); BrienzAction GetAction = access.GetActionByActionID(ActionID); actStr.ActionID = GetAction.ActionID; actStr.EndTime = GetAction.EndTime ?? DateTime.Now; actStr.FromResource = GetAction.FromResource; actStr.DocumentXaml = GetAction.ActionContent; //TODO: actStr.Location = GetAction.Location; actStr.IsAllDayEvent = GetAction.IsAllDayEvent ?? false; actStr.Priority = GetAction.Priority; actStr.StartTime = GetAction.StartTime ?? DateTime.Now; actStr.Subject = GetAction.Subject; return(actStr); }
public List <AlertStructure> GetAllAlert() { BrienzDataAccess db = new BrienzDataAccess(); List <AlertStructure> result = new List <AlertStructure>(); List <BrienzAlert> AlertsCollection = db.GetAllAlerts(); foreach (BrienzAlert AlertIndex in AlertsCollection) { result.Add( new AlertStructure { AlertID = AlertIndex.AlertID, AlertSubject = AlertIndex.AlertSubject, Severity = AlertIndex.AlertSeverity, AlertContent = AlertIndex.AlertContent, AlertReason = AlertIndex.AlertReason, Alert_Tag = AlertIndex.Alert_Tag, AlertTime = AlertIndex.AlertTime ?? DateTime.Now }); } return(result); }
public void GetActionList() { access = new BrienzDataAccess(); List <BrienzAction> actionCollection = access.GetAllAction(); int number = 0; foreach (BrienzAction ActionIndex in actionCollection.OrderBy(c => c.Priority)) { actionList.Add(new ActionStructure { ID = ++number, ActionID = ActionIndex.ActionID, Subject = ActionIndex.Subject, EndTime = ActionIndex.EndTime ?? DateTime.Now, FromResource = ActionIndex.FromResource, IsAllDayEvent = ActionIndex.IsAllDayEvent ?? false, Location = ActionIndex.Location, Priority = ActionIndex.Priority, DocumentXaml = ActionIndex.ActionContent, StartTime = ActionIndex.StartTime ?? DateTime.Now }); } }
public LearnFromItViewModel() { access = new BrienzDataAccess(); }
public BrienzTagViewModel() { bda = new BrienzDataAccess(); }
public MagneticViewModel() { DBA = new BrienzDataAccess(); }