//public DataGrid ActionDataGrid //{ // get // { // return getDataGrid(); // } //} //private DataGrid getDataGrid() //{ // DataGrid dg = new DataGrid(); // dg.DataContext = new NewAction(); // return dg; //} //public ICommand UpdateParentWindowActionGrid //{ // get // { // return new DelegateCommand(() => { // new NewAction(); // }); // } //} public void SaveActionUpdateParentWindowActionGrid() { BrienzAction newAction = new BrienzAction(); newAction.ActionContent = this.DocumentXaml; newAction.EndTime = this.EndTime; newAction.FromResource = this.FromResource; newAction.IsAllDayEvent = this.IsAllDayEvent; newAction.Location = this.Location; newAction.Priority = this.Priority.Content as string; newAction.StartTime = this.StartTime; newAction.Subject = this.Subject; access.SaveAction(newAction); actionList.Add(new ActionStructure { //ActionID = newAction.ActionID, Subject = newAction.Subject, EndTime = newAction.EndTime ?? DateTime.Now, FromResource = newAction.FromResource, IsAllDayEvent = newAction.IsAllDayEvent ?? false, Location = newAction.Location, Priority = newAction.Priority, DocumentXaml = newAction.ActionContent, StartTime = newAction.StartTime ?? DateTime.Now }); }
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); }
private void btAddAction_Click(object sender, RoutedEventArgs e) { BrienzAction brienzActionWindow = new BrienzAction(); brienzActionWindow.ShowDialog(); }