Ejemplo n.º 1
0
 /// <summary>
 /// Handles the Click event of the Add control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.Windows.RoutedEventArgs" /> instance containing the event data.</param>
 private void Add_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     addEdit      = new AddEditDataSources();
     addEdit.Mode = ModeEnum.Add;
     //addEdit.SelectedDatasourceDto = new DatasourceDto();
     addEdit.OrganizationId = ((OrganizationDto)cmbOrgName.SelectedItem).Id;
     addEdit.CUDDatasourceCompletedEvent += new Client.Application.CUDDatasourceCompletedEventHandler(addEdit_CUDDatasourceCompletedEvent);
     addEdit.Closed += new EventHandler(addEdit_Closed);
     addEdit.Show();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Edits the selected user.
        /// </summary>
        /// <param name="userDto">The user dto.</param>
        private void EditDatasource(DatasourceDto dsdto)
        {
            addEdit = new AddEditDataSources();

            if (applicationViewModel.DemoMode)
            {
                dsdto.Connection.ServerName = "<server name withheld> ";
            }


            //addEdit.UserMode = ClientCommon.UserOperationModeEnum.Edit;
            addEdit.Title = "Edit Data Source";
            addEdit.SelectedDatasourceDto = dsdto;
            addEdit.OrganizationId        = ((OrganizationDto)cmbOrgName.SelectedItem).Id;
            //addEdit.UserDto = dsdto;
            //addEdit.CurrentUserActionEnum = Organization.UserActionEnum.EditExistOrg | Organization.UserActionEnum.EditUserOfExistOrg;
            addEdit.Mode = ModeEnum.Edit;
            addEdit.CUDDatasourceCompletedEvent += new Client.Application.CUDDatasourceCompletedEventHandler(addEdit_CUDDatasourceCompletedEvent);
            //addEdit.Mode = AddEditUsers.ModeType.Edit;
            addEdit.Closed += new EventHandler(addEdit_Closed);
            addEdit.Show();
        }