Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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
                });
            }
        }
Exemplo n.º 5
0
 public LearnFromItViewModel()
 {
     access = new BrienzDataAccess();
 }
Exemplo n.º 6
0
 public BrienzTagViewModel()
 {
     bda = new BrienzDataAccess();
 }
Exemplo n.º 7
0
 public MagneticViewModel()
 {
     DBA = new BrienzDataAccess();
 }