public void UpdateSIPDialplanRouteTest() { SIPEntitiesDomainService target = new SIPEntitiesDomainService(); // TODO: Initialize to an appropriate value SIPDialplanRoute currentSIPDialplanRoute = null; // TODO: Initialize to an appropriate value target.UpdateSIPDialplanRoute(currentSIPDialplanRoute); Assert.Inconclusive("A method that does not return a value cannot be verified."); }
public void UpdateSIPDialplanRoute(SIPDialplanRoute currentSIPDialplanRoute) { if (currentSIPDialplanRoute.Owner != this.ServiceContext.User.Identity.Name) { throw new ApplicationException("You are not authorised to update this record."); } else { this.ObjectContext.SIPDialplanRoutes.AttachAsModified(currentSIPDialplanRoute, this.ChangeSet.GetOriginal(currentSIPDialplanRoute)); } }
public void InsertSIPDialplanRoute(SIPDialplanRoute sipDialplanRoute) { sipDialplanRoute.Owner = this.ServiceContext.User.Identity.Name; if ((sipDialplanRoute.EntityState != EntityState.Detached)) { this.ObjectContext.ObjectStateManager.ChangeObjectState(sipDialplanRoute, EntityState.Added); } else { this.ObjectContext.SIPDialplanRoutes.AddObject(sipDialplanRoute); } }
private void EditEndingRoute(object sender, System.Windows.Controls.DataFormEditEndingEventArgs e) { if (m_gridReady) { DataForm dataForm = sender as DataForm; if (dataForm.Mode == DataFormMode.AddNew) { SIPDialplanRoute route = dataForm.CurrentItem as SIPDialplanRoute; route.ID = Guid.NewGuid().ToString(); route.DialPlanID = m_dialPlan.ID; route.Owner = m_owner; } } }
public void DeleteSIPDialplanRoute(SIPDialplanRoute sipDialplanRoute) { if (sipDialplanRoute.Owner != this.ServiceContext.User.Identity.Name) { throw new ApplicationException("You are not authorised to delete this record."); } else { if ((sipDialplanRoute.EntityState == EntityState.Detached)) { this.ObjectContext.SIPDialplanRoutes.Attach(sipDialplanRoute); } this.ObjectContext.SIPDialplanRoutes.DeleteObject(sipDialplanRoute); } }
private void DeleteRoute(object sender, System.ComponentModel.CancelEventArgs e) { SIPDialplanRoute routeEntry = m_routesDataGrid.SelectedItem as SIPDialplanRoute; MessageBoxResult confirmDelete = MessageBox.Show("Press Ok to delete Route " + routeEntry.RouteName + ".", "Confirm Delete", MessageBoxButton.OKCancel); if (confirmDelete == MessageBoxResult.OK) { e.Cancel = true; m_riaContext.SIPDialplanRoutes.Remove(routeEntry); m_riaContext.SubmitChanges(SubmitComplete, null); } else { e.Cancel = true; } }