public virtual void SendEmailEditGroup(GroupSubmission group, string toEmail) { var messageSubject = $"Edit group {group.Name}"; _logger.LogInformation("Sending edit group email"); var emailBody = new GroupEdit { Name = group.Name, Categories = group.CategoriesList, Description = group.Description, Email = group.Email, Location = group.Address, Facebook = group.Facebook, Phone = group.PhoneNumber, Twitter = group.Twitter, Website = group.Website, AgeRanges = group.AgeRanges.Where(o => o.IsSelected).Select(o => o.Name).ToList(), Suitabilities = group.Suitabilities.Where(o => o.IsSelected).Select(o => o.Name).ToList(), Volunteering = group.Volunteering ? "Yes" : "No", VolunteeringText = group.Volunteering ? group.VolunteeringText : "N/A", AdditionalInformation = group.AdditionalInformation }; var message = new EmailMessage(messageSubject, _emailClient.GenerateEmailBodyFromHtml(emailBody), _fromEmail, toEmail + "," + _configuration.GetGroupArchiveEmail(_businessId.ToString()), new List <IFormFile>()); _emailClient.SendEmailToService(message); }
public async Task <IActionResult> Edit(GroupEdit groupEdit) { GroupEditValidator validator = new GroupEditValidator(this._groupService); ValidationResult results = await validator.ValidateAsync(groupEdit); results.AddToModelState(ModelState, "GroupEdit"); if (!ModelState.IsValid) { return(BadRequest(this.ModelState)); } int connectedUserId = int.Parse(User.Identity.Name); User connectedUser = await this._userService.GetWithRequest(connectedUserId); if (connectedUser.Role != Role.Admin && (connectedUser.Role == Role.Member && !connectedUser.ParticipantGroups.Any(pg => pg.IsCreator))) { return(BadRequest("You are not an admin or the creator of this group !")); } await this._groupService.Edit(groupEdit); return(Ok()); }
public async Task Edit(GroupEdit groupToEdit) { Group orignalGroup = await this.groupRepository.GetWithRequestUser(groupToEdit.Id); List <int> originalMembers = orignalGroup.Members.Where(pg => pg.Status == Status.Accepted).Select(pg => pg.User).Select(user => user.Id).ToList(); List <int> currentMembers = groupToEdit.MembersId; currentMembers.Add(groupToEdit.CreatorId); List <int> membersToDelete = originalMembers.Except(currentMembers).ToList(); membersToDelete.ForEach( (userId) => { ParticipantGroup requestAccepted = orignalGroup.Members.FirstOrDefault(pg => pg.UserId == userId); orignalGroup.Members.Remove(requestAccepted); } ); List <int> membersToAdd = currentMembers.Except(originalMembers).ToList(); foreach (var userId in membersToAdd) { await RemoveAllRequests(userId); } membersToAdd.ForEach( (userId) => { if (userId != groupToEdit.CreatorId) { orignalGroup.Members.Add(new ParticipantGroup { IsCreator = false, Status = Status.Accepted, BelongingGroup = orignalGroup, BelongingGroupId = orignalGroup.Id, UserId = userId }); } else { orignalGroup.Members.Add(new ParticipantGroup { IsCreator = true, Status = Status.Accepted, BelongingGroup = orignalGroup, BelongingGroupId = orignalGroup.Id, UserId = userId }); } } ); orignalGroup.Name = groupToEdit.Name; await this.groupRepository.Update(orignalGroup); }
private void metroButton5_Click(object sender, EventArgs e) { try { SubFormas.GroupEdit newp = new GroupEdit(); newp.Show(); } catch (Exception) { } }
public ActionResult ViewEditGroup(int id, GroupEdit group) { if (group != null) { Group GroupToUpdate = unitOfWork.GroupRepository.FindBy(x => x.GroupNo == id); IEnumerable <StudentData.GroupType> GroupTypes = unitOfWork.GroupTypeRepository.Find(x => x.GroupTypeDesc != "456"); List <Models.GroupType> groupTypes = new List <Models.GroupType>(); foreach (var gtype in GroupTypes) { groupTypes.Add(new Models.GroupType() { GroupTypeNo = gtype.GroupTypeNo, GroupTypeDesc = gtype.GroupTypeDesc }); } GroupEdit groupmodel = new GroupEdit() { GroupNo = GroupToUpdate.GroupNo, GroupDesc = GroupToUpdate.GroupDesc, GroupPersonNo = GroupToUpdate.GroupPersonNo, GroupType = GroupToUpdate.GroupTypeNo, GroupTypes = groupTypes, StartDate = GroupToUpdate.StartDate, EndDate = GroupToUpdate.EndDate, SystemDate = (DateTime)GroupToUpdate.SystemDate, Persons = ListOfPersons().Select(x => new SelectListItem { Value = x.PersonNo.ToString(), Text = x.Name }), SelectedPersonNo = group.SelectedPersonNo }; if (groupmodel.SelectedPersonNo != 0) { AddGroupMember(groupmodel.SelectedPersonNo, groupmodel.GroupNo); } ViewBag.ListOfWorkByGroup = ListOfWorkByGroup(GroupToUpdate.GroupNo); ViewBag.ListOfmembersByGroup = ListOfMembersByGroup(GroupToUpdate.GroupNo); ViewBag.ListOfPersons = ListOfPersons(); return(View("ViewEditGroup", groupmodel)); } GroupEdit Dummygroupmodel = new GroupEdit() { GroupNo = 0, GroupDesc = "", GroupPersonNo = 0 }; ViewBag.ListOfWorkByGroup = ListOfWorkByGroup(Dummygroupmodel.GroupNo); ViewBag.ListOfmembersByGroup = ListOfMembersByGroup(Dummygroupmodel.GroupNo); ViewBag.ListOfPersons = ListOfPersons(); return(View("ViewEditGroup", Dummygroupmodel)); }
protected void DrawCheckBox(Graphics g, Rectangle r, bool Checked) { BaseEditPainter painter = GroupEdit.CreatePainter(); BaseEditViewInfo info = GroupEdit.CreateViewInfo(); info.EditValue = Checked; info.Bounds = r; info.CalcViewInfo(g); ControlGraphicsInfoArgs args = new ControlGraphicsInfoArgs(info, new DevExpress.Utils.Drawing.GraphicsCache(g), r); painter.Draw(args); args.Cache.Dispose(); }
public bool EditGroup(GroupEdit model) { using (var ctx = new ApplicationDbContext()) { var entity = ctx.Groups.FirstOrDefault(c => c.GroupID == model.GroupID); entity.Name = model.Name; entity.TripType = model.TripType; entity.GuestCount = model.GuestCount; return(ctx.SaveChanges() == 1); } }
public ActionResult Edit(int id) { var service = CreateGroupService(); var detail = service.GetGroupById(id); var model = new GroupEdit { GroupID = detail.GroupID, GroupName = detail.GroupName }; return(View(model)); }
private void mnu_add_group_Click(object sender, EventArgs e) { GroupEdit dlg = new GroupEdit(); GroupItem group = new GroupItem(); group.Name = string.Format("Group{0}", Package.Groups.Items.Count); dlg.Set(group); if (dlg.ShowDialog() == DialogResult.OK) { AddGroup(dlg.Get()); Package.Groups.Add(group); } }
public GroupViewModel(Guid id) { _id = id; this.Edit = new DelegateCommand(() => { GroupEdit.ShowEditWindow(this); }); this.Remove = new DelegateCommand(() => { if (this.Id == Guid.Empty) { return; } DialogWindow.ShowDialog(message: $"您确定删除{this.Name}组吗?", title: "确认", onYes: () => { Global.Execute(new RemoveGroupCommand(this.Id)); }, icon: "Icon_Confirm"); }); this.SortUp = new DelegateCommand(() => { GroupViewModel upOne = GroupViewModels.Current.List.OrderByDescending(a => a.SortNumber).FirstOrDefault(a => a.SortNumber < this.SortNumber); if (upOne != null) { int sortNumber = upOne.SortNumber; upOne.SortNumber = this.SortNumber; Global.Execute(new UpdateGroupCommand(upOne)); this.SortNumber = sortNumber; Global.Execute(new UpdateGroupCommand(this)); GroupViewModels.Current.OnPropertyChanged(nameof(GroupViewModels.List)); } }); this.SortDown = new DelegateCommand(() => { GroupViewModel nextOne = GroupViewModels.Current.List.OrderBy(a => a.SortNumber).FirstOrDefault(a => a.SortNumber > this.SortNumber); if (nextOne != null) { int sortNumber = nextOne.SortNumber; nextOne.SortNumber = this.SortNumber; Global.Execute(new UpdateGroupCommand(nextOne)); this.SortNumber = sortNumber; Global.Execute(new UpdateGroupCommand(this)); GroupViewModels.Current.OnPropertyChanged(nameof(GroupViewModels.List)); } }); this.AddCoinGroup = new DelegateCommand <CoinViewModel>((coinVm) => { var coinGroupVms = CoinGroupViewModels.Current.GetCoinGroupsByGroupId(this.Id); int sortNumber = coinGroupVms.Count == 0 ? 1 : coinGroupVms.Count + 1; CoinGroupViewModel coinGroupVm = new CoinGroupViewModel(Guid.NewGuid()) { CoinId = coinVm.Id, GroupId = this.Id, SortNumber = sortNumber }; Global.Execute(new AddCoinGroupCommand(coinGroupVm)); }); }
public bool UpdateGroup(GroupEdit model) { using (var ctx = new ApplicationDbContext()) { var entity = ctx .Groups .Single(e => e.GroupId == model.GroupId && e.CreatorId == _creatorId); entity.GroupName = model.GroupName; //entity.Id = model.Id; -- future development return(ctx.SaveChanges() == 1); } }
public ActionResult Edit(int id) { var service = CreateGroupService(); var detail = service.GetGroupById(id); var model = new GroupEdit { GroupId = detail.GroupId, GroupName = detail.GroupName //Id = detail.Id -- future development }; return(View(model)); }
public bool UpdateGroup(GroupEdit model) { using (var ctx = new ApplicationDbContext()) { var entity = ctx .Groups .Single(e => e.GroupID == model.GroupID); entity.GroupID = model.GroupID; entity.GroupName = model.GroupName; return(ctx.SaveChanges() == 1); } }
public ActionResult CreateGroup(GroupEdit model) { var grp = new Group() { GroupTypeNo = model.GroupType, GroupDesc = model.GroupDesc, StartDate = model.StartDate, EndDate = model.EndDate, SystemDate = DateTime.Now, GroupPersonNo = model.GroupPersonNo }; unitOfWork.GroupRepository.Add(grp); unitOfWork.Save(); ViewBag.Groups = ListOfGroups(); return(View("CreateGroup")); }
public ActionResult Edit(int id, GroupEdit model) { if (!ModelState.IsValid) { return(View(model)); } if (model.GroupID != id) { ModelState.AddModelError("", "Id Mismatch"); return(View(model)); } var service = CreateGroupService(); if (service.UpdateGroup(model)) { TempData["SaveResult"] = "Your group was updated."; return(RedirectToAction("Index")); } ModelState.AddModelError("", "Your group could not be updated."); return(View()); }
public override void Link() { VirtualRoot.BuildCmdPath <ShowDialogWindowCommand>(action: message => { UIThread.Execute(() => { DialogWindow.ShowDialog(new DialogWindowViewModel(message: message.Message, title: message.Title, onYes: message.OnYes, icon: message.Icon)); }); }); VirtualRoot.BuildCmdPath <ShowQQGroupQrCodeCommand>(action: message => { UIThread.Execute(() => { QQGroupQrCode.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowCalcCommand>(action: message => { UIThread.Execute(() => { Calc.ShowWindow(message.CoinVm); }); }); VirtualRoot.BuildCmdPath <ShowLocalIpsCommand>(action: message => { UIThread.Execute(() => { LocalIpConfig.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowEthNoDevFeeCommand>(action: message => { UIThread.Execute(() => { EthNoDevFeeEdit.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowCalcConfigCommand>(action: message => { UIThread.Execute(() => { CalcConfig.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowMinerClientsWindowCommand>(action: message => { UIThread.Execute(() => { MinerClientsWindow.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowNTMinerUpdaterConfigCommand>(action: message => { UIThread.Execute(() => { NTMinerUpdaterConfig.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowAboutPageCommand>(action: message => { UIThread.Execute(() => { AboutPage.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowKernelOutputPageCommand>(action: message => { UIThread.Execute(() => { KernelOutputPage.ShowWindow(message.SelectedKernelOutputVm); }); }); VirtualRoot.BuildCmdPath <ShowKernelInputPageCommand>(action: message => { UIThread.Execute(() => { KernelInputPage.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowTagBrandCommand>(action: message => { if (NTMinerRoot.IsBrandSpecified) { return; } BrandTag.ShowWindow(); }); VirtualRoot.BuildCmdPath <ShowCoinPageCommand>(action: message => { UIThread.Execute(() => { CoinPage.ShowWindow(message.CurrentCoin, message.TabType); }); }); VirtualRoot.BuildCmdPath <ShowGroupPageCommand>(action: message => { UIThread.Execute(() => { GroupPage.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowSysDicPageCommand>(action: message => { UIThread.Execute(() => { SysDicPage.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowVirtualMemoryCommand>(action: message => { UIThread.Execute(() => { VirtualMemory.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowRestartWindowsCommand>(action: message => { UIThread.Execute(() => { RestartWindows.ShowDialog(); }); }); VirtualRoot.BuildCmdPath <ShowNotificationSampleCommand>(action: message => { UIThread.Execute(() => { NotificationSample.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowPropertyCommand>(action: message => { UIThread.Execute(() => { Property.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowChartsWindowCommand>(action: message => { UIThread.Execute(() => { ChartsWindow.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowOverClockDataPageCommand>(action: message => { UIThread.Execute(() => { OverClockDataPage.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowNTMinerWalletPageCommand>(action: message => { UIThread.Execute(() => { NTMinerWalletPage.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowMessagePathIdsCommand>(action: message => { UIThread.Execute(() => { MessagePathIds.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowUserPageCommand>(action: message => { UIThread.Execute(() => { UserPage.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowRemoteDesktopLoginDialogCommand>(action: message => { RemoteDesktopLogin.ShowWindow(message.Vm); }); VirtualRoot.BuildCmdPath <ShowKernelsWindowCommand>(action: message => { UIThread.Execute(() => { KernelsWindow.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowKernelDownloaderCommand>(action: message => { UIThread.Execute(() => { KernelDownloading.ShowWindow(message.KernelId, message.DownloadComplete); }); }); VirtualRoot.BuildCmdPath <EnvironmentVariableEditCommand>(action: message => { UIThread.Execute(() => { EnvironmentVariableEdit.ShowWindow(message.CoinKernelVm, message.EnvironmentVariable); }); }); VirtualRoot.BuildCmdPath <InputSegmentEditCommand>(action: message => { UIThread.Execute(() => { InputSegmentEdit.ShowWindow(message.CoinKernelVm, message.Segment); }); }); VirtualRoot.BuildCmdPath <CoinKernelEditCommand>(action: message => { UIThread.Execute(() => { CoinKernelEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <CoinEditCommand>(action: message => { UIThread.Execute(() => { CoinEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <ColumnsShowEditCommand>(action: message => { UIThread.Execute(() => { ColumnsShowEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <ShowContainerWindowCommand>(action: message => { UIThread.Execute(() => { ContainerWindow window = ContainerWindow.GetWindow(message.Vm); window?.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowSpeedChartsCommand>(action: message => { UIThread.Execute(() => { SpeedCharts.ShowWindow(message.GpuSpeedVm); }); }); VirtualRoot.BuildCmdPath <ShowFileWriterPageCommand>(action: message => { UIThread.Execute(() => { FileWriterPage.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <FileWriterEditCommand>(action: message => { UIThread.Execute(() => { FileWriterEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <ShowFragmentWriterPageCommand>(action: message => { UIThread.Execute(() => { FragmentWriterPage.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <FragmentWriterEditCommand>(action: message => { UIThread.Execute(() => { FragmentWriterEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <GroupEditCommand>(action: message => { UIThread.Execute(() => { GroupEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <KernelInputEditCommand>(action: message => { UIThread.Execute(() => { KernelInputEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <KernelOutputFilterEditCommand>(action: message => { UIThread.Execute(() => { KernelOutputFilterEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <KernelOutputTranslaterEditCommand>(action: message => { UIThread.Execute(() => { KernelOutputTranslaterEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <KernelOutputEditCommand>(action: message => { UIThread.Execute(() => { KernelOutputEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <ShowPackagesWindowCommand>(action: message => { UIThread.Execute(() => { PackagesWindow.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <KernelEditCommand>(action: message => { UIThread.Execute(() => { KernelEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <ShowLogColorCommand>(action: message => { UIThread.Execute(() => { LogColor.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <ShowMinerClientSettingCommand>(action: message => { UIThread.Execute(() => { MinerClientSetting.ShowWindow(message.Vm); }); }); VirtualRoot.BuildCmdPath <ShowMinerNamesSeterCommand>(action: message => { UIThread.Execute(() => { MinerNamesSeter.ShowWindow(message.Vm); }); }); VirtualRoot.BuildCmdPath <ShowGpuProfilesPageCommand>(action: message => { UIThread.Execute(() => { GpuProfilesPage.ShowWindow(message.MinerClientsWindowVm); }); }); VirtualRoot.BuildCmdPath <ShowMinerClientAddCommand>(action: message => { UIThread.Execute(() => { MinerClientAdd.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <MinerGroupEditCommand>(action: message => { UIThread.Execute(() => { MinerGroupEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <NTMinerWalletEditCommand>(action: message => { UIThread.Execute(() => { NTMinerWalletEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <MineWorkEditCommand>(action: message => { UIThread.Execute(() => { MineWorkEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <OverClockDataEditCommand>(action: message => { UIThread.Execute(() => { OverClockDataEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <PackageEditCommand>(action: message => { UIThread.Execute(() => { PackageEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <PoolKernelEditCommand>(action: message => { UIThread.Execute(() => { PoolKernelEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <PoolEditCommand>(action: message => { UIThread.Execute(() => { PoolEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <ShowControlCenterHostConfigCommand>(action: message => { UIThread.Execute(() => { ControlCenterHostConfig.ShowWindow(); }); }); VirtualRoot.BuildCmdPath <SysDicItemEditCommand>(action: message => { UIThread.Execute(() => { SysDicItemEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <SysDicEditCommand>(action: message => { UIThread.Execute(() => { SysDicEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <UserEditCommand>(action: message => { UIThread.Execute(() => { UserEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.BuildCmdPath <WalletEditCommand>(action: message => { UIThread.Execute(() => { WalletEdit.ShowWindow(message.FormType, message.Source); }); }); }
public GroupViewModel(Guid id) { _id = id; this.Save = new DelegateCommand(() => { if (this.Id == Guid.Empty) { return; } if (NTMinerRoot.Current.GroupSet.Contains(this.Id)) { VirtualRoot.Execute(new UpdateGroupCommand(this)); } else { VirtualRoot.Execute(new AddGroupCommand(this)); } CloseWindow?.Invoke(); }); this.Edit = new DelegateCommand <FormType?>((formType) => { if (this.Id == Guid.Empty) { return; } GroupEdit.ShowWindow(formType ?? FormType.Edit, this); }); this.Remove = new DelegateCommand(() => { if (this.Id == Guid.Empty) { return; } DialogWindow.ShowDialog(message: $"您确定删除{this.Name}组吗?", title: "确认", onYes: () => { VirtualRoot.Execute(new RemoveGroupCommand(this.Id)); }, icon: IconConst.IconConfirm); }); this.SortUp = new DelegateCommand(() => { GroupViewModel upOne = GroupViewModels.Current.List.OrderByDescending(a => a.SortNumber).FirstOrDefault(a => a.SortNumber < this.SortNumber); if (upOne != null) { int sortNumber = upOne.SortNumber; upOne.SortNumber = this.SortNumber; VirtualRoot.Execute(new UpdateGroupCommand(upOne)); this.SortNumber = sortNumber; VirtualRoot.Execute(new UpdateGroupCommand(this)); GroupViewModels.Current.OnPropertyChanged(nameof(GroupViewModels.List)); } }); this.SortDown = new DelegateCommand(() => { GroupViewModel nextOne = GroupViewModels.Current.List.OrderBy(a => a.SortNumber).FirstOrDefault(a => a.SortNumber > this.SortNumber); if (nextOne != null) { int sortNumber = nextOne.SortNumber; nextOne.SortNumber = this.SortNumber; VirtualRoot.Execute(new UpdateGroupCommand(nextOne)); this.SortNumber = sortNumber; VirtualRoot.Execute(new UpdateGroupCommand(this)); GroupViewModels.Current.OnPropertyChanged(nameof(GroupViewModels.List)); } }); this.AddCoinGroup = new DelegateCommand <CoinViewModel>((coinVm) => { if (coinVm == null) { return; } var coinGroupVms = CoinGroupViewModels.Current.GetCoinGroupsByGroupId(this.Id); int sortNumber = coinGroupVms.Count == 0 ? 1 : coinGroupVms.Count + 1; CoinGroupViewModel coinGroupVm = new CoinGroupViewModel(Guid.NewGuid()) { CoinId = coinVm.Id, GroupId = this.Id, SortNumber = sortNumber }; VirtualRoot.Execute(new AddCoinGroupCommand(coinGroupVm)); }); }
public override void BuildPaths() { var location = this.GetType(); VirtualRoot.AddCmdPath <ShowDialogWindowCommand>(action: message => { UIThread.Execute(() => { DialogWindow.ShowSoftDialog(new DialogWindowViewModel(message: message.Message, title: message.Title, onYes: message.OnYes, icon: message.Icon)); }); }, location: location); VirtualRoot.AddCmdPath <ShowCalcCommand>(action: message => { UIThread.Execute(() => { Calc.ShowWindow(message.CoinVm); }); }, location: location); VirtualRoot.AddCmdPath <ShowLocalIpsCommand>(action: message => { UIThread.Execute(() => { MinerClientUcs.LocalIpConfig.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowAboutPageCommand>(action: message => { UIThread.Execute(() => { AboutPage.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowKernelOutputPageCommand>(action: message => { UIThread.Execute(() => { KernelOutputPage.ShowWindow(message.SelectedKernelOutputVm); }); }, location: location); VirtualRoot.AddCmdPath <ShowKernelInputPageCommand>(action: message => { UIThread.Execute(() => { KernelInputPage.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowTagBrandCommand>(action: message => { if (NTMinerContext.IsBrandSpecified) { return; } UIThread.Execute(() => { BrandTag.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowCoinPageCommand>(action: message => { UIThread.Execute(() => { CoinPage.ShowWindow(message.CurrentCoin, message.TabType); }); }, location: location); VirtualRoot.AddCmdPath <ShowCoinGroupsCommand>(action: message => { UIThread.Execute(() => { CoinGroupPage.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowSysDicPageCommand>(action: message => { UIThread.Execute(() => { SysDicPage.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowVirtualMemoryCommand>(action: message => { UIThread.Execute(() => { MinerClientUcs.VirtualMemory.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowRestartWindowsCommand>(action: message => { UIThread.Execute(() => { RestartWindows.ShowDialog(new RestartWindowsViewModel(message.CountDownSeconds)); }); }, location: location); VirtualRoot.AddCmdPath <ShowNotificationSampleCommand>(action: message => { UIThread.Execute(() => { NotificationSample.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowPropertyCommand>(action: message => { UIThread.Execute(() => { Property.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowMessagePathIdsCommand>(action: message => { UIThread.Execute(() => { MessagePathIds.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowKernelsWindowCommand>(action: message => { UIThread.Execute(() => { KernelsWindow.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowKernelDownloaderCommand>(action: message => { UIThread.Execute(() => { KernelDownloading.ShowWindow(message.KernelId, message.DownloadComplete); }); }, location: location); VirtualRoot.AddCmdPath <EditEnvironmentVariableCommand>(action: message => { UIThread.Execute(() => { EnvironmentVariableEdit.ShowWindow(message.CoinKernelVm, message.EnvironmentVariable); }); }, location: location); VirtualRoot.AddCmdPath <EditInputSegmentCommand>(action: message => { UIThread.Execute(() => { InputSegmentEdit.ShowWindow(message.CoinKernelVm, message.Segment); }); }, location: location); VirtualRoot.AddCmdPath <EditCoinKernelCommand>(action: message => { UIThread.Execute(() => { CoinKernelEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditCoinCommand>(action: message => { UIThread.Execute(() => { CoinEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <ShowSpeedChartsCommand>(action: message => { UIThread.Execute(() => { SpeedCharts.ShowWindow(message.GpuSpeedVm); }); }, location: location); VirtualRoot.AddCmdPath <ShowFileWriterPageCommand>(action: message => { UIThread.Execute(() => { FileWriterPage.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <EditFileWriterCommand>(action: message => { UIThread.Execute(() => { FileWriterEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <ShowFragmentWriterPageCommand>(action: message => { UIThread.Execute(() => { FragmentWriterPage.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <EditFragmentWriterCommand>(action: message => { UIThread.Execute(() => { FragmentWriterEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditGroupCommand>(action: message => { UIThread.Execute(() => { GroupEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditServerMessageCommand>(action: message => { UIThread.Execute(() => { ServerMessageEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditKernelInputCommand>(action: message => { UIThread.Execute(() => { KernelInputEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditKernelOutputKeywordCommand>(action: message => { UIThread.Execute(() => { KernelOutputKeywordEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditKernelOutputTranslaterCommand>(action: message => { UIThread.Execute(() => { KernelOutputTranslaterEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditKernelOutputCommand>(action: message => { UIThread.Execute(() => { KernelOutputEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <ShowPackagesWindowCommand>(action: message => { UIThread.Execute(() => { PackagesWindow.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <EditKernelCommand>(action: message => { UIThread.Execute(() => { KernelEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditPackageCommand>(action: message => { UIThread.Execute(() => { PackageEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditPoolKernelCommand>(action: message => { UIThread.Execute(() => { PoolKernelEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditPoolCommand>(action: message => { UIThread.Execute(() => { PoolEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditSysDicItemCommand>(action: message => { UIThread.Execute(() => { SysDicItemEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditSysDicCommand>(action: message => { UIThread.Execute(() => { SysDicEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <ShowKernelOutputKeywordsCommand>(action: message => { UIThread.Execute(() => { KernelOutputKeywords.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowSignUpPageCommand>(action: message => { UIThread.Execute(() => { SignUpPage.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <EditWalletCommand>(action: message => { UIThread.Execute(() => { WalletEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); #region MinerStudio VirtualRoot.AddCmdPath <ShowQQGroupQrCodeCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.QQGroupQrCode.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowCalcConfigCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.CalcConfig.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowMinerClientsWindowCommand>(action: message => { UIThread.Execute(() => { MinerStudioViews.MinerClientsWindow.ShowWindow(message.IsToggle); }); }, location: location); VirtualRoot.AddCmdPath <ShowNTMinerUpdaterConfigCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.NTMinerUpdaterConfig.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowMinerClientFinderConfigCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.MinerClientFinderConfig.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowChartsWindowCommand>(action: message => { UIThread.Execute(() => { MinerStudioViews.ChartsWindow.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowOverClockDataPageCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.OverClockDataPage.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowMinerStudioVirtualMemoryCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.VirtualMemory.ShowWindow(message.Vm); }); }, location: location); VirtualRoot.AddCmdPath <ShowMinerStudioLocalIpsCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.LocalIpConfig.ShowWindow(message.Vm); }); }, location: location); VirtualRoot.AddCmdPath <ShowNTMinerWalletPageCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.NTMinerWalletPage.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowUserPageCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.UserPage.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowGpuNamePageCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.GpuNameCounts.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowChangePassword>(action: message => { UIThread.Execute(() => { MinerStudioUcs.ChangePassword.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowWsServerNodePageCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.WsServerNodePage.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <ShowRemoteDesktopLoginDialogCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.RemoteDesktopLogin.ShowWindow(message.Vm); }); }, location: location); VirtualRoot.AddCmdPath <ShowMinerClientSettingCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.MinerClientSetting.ShowWindow(message.Vm); }); }, location: location); VirtualRoot.AddCmdPath <ShowMinerNamesSeterCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.MinerNamesSeter.ShowWindow(message.Vm); }); }, location: location); VirtualRoot.AddCmdPath <ShowGpuProfilesPageCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.GpuProfilesPage.ShowWindow(message.MinerClientsWindowVm); }); }, location: location); VirtualRoot.AddCmdPath <ShowMinerClientAddCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.MinerClientAdd.ShowWindow(); }); }, location: location); VirtualRoot.AddCmdPath <EditMinerGroupCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.MinerGroupEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditNTMinerWalletCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.NTMinerWalletEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditMineWorkCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.MineWorkEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditOverClockDataCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.OverClockDataEdit.ShowWindow(message.FormType, message.Source); }); }, location: location); VirtualRoot.AddCmdPath <EditColumnsShowCommand>(action: message => { UIThread.Execute(() => { MinerStudioUcs.ColumnsShowEdit.ShowWindow(message.Source); }); }, location: location); #endregion }
public ActionResult ViewCreateGroup(GroupEdit model) { ViewBag.Groups = ListOfGroups(); return(View("CreateGroup", ListOfGroups())); }
public override void Link() { VirtualRoot.Window <ShowDialogWindowCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { DialogWindow.ShowDialog(message: message.Message, title: message.Title, onYes: message.OnYes, icon: message.Icon); }); }); VirtualRoot.Window <ShowQQGroupQrCodeCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { QQGroupQrCode.ShowWindow(); }); }); VirtualRoot.Window <ShowCalcCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { Calc.ShowWindow(message.CoinVm); }); }); VirtualRoot.Window <ShowFileDownloaderCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { FileDownloader.ShowWindow(message.DownloadFileUrl, message.FileTitle, message.DownloadComplete); }); }); VirtualRoot.Window <ShowAboutPageCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { AboutPage.ShowWindow(); }); }); VirtualRoot.Window <ShowKernelOutputPageCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { KernelOutputPage.ShowWindow(message.SelectedKernelOutputVm); }); }); VirtualRoot.Window <ShowKernelInputPageCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { KernelInputPage.ShowWindow(); }); }); VirtualRoot.Window <ShowGroupPageCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { GroupPage.ShowWindow(); }); }); VirtualRoot.Window <ShowSysDicPageCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { SysDicPage.ShowWindow(); }); }); VirtualRoot.Window <ShowVirtualMemoryCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { VirtualMemory.ShowWindow(); }); }); VirtualRoot.Window <ShowRestartWindowsCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { RestartWindows.ShowDialog(); }); }); VirtualRoot.Window <ShowNotificationSampleCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { NotificationSample.ShowWindow(); }); }); VirtualRoot.Window <ShowOuterPropertyCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { OuterProperty.ShowWindow(); }); }); VirtualRoot.Window <ShowInnerPropertyCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { InnerProperty.ShowWindow(); }); }); VirtualRoot.Window <ShowUserPageCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { UserPage.ShowWindow(); }); }); VirtualRoot.Window <ShowKernelDownloaderCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { KernelDownloading.ShowWindow(message.KernelId, message.DownloadComplete); }); }); VirtualRoot.Window <EnvironmentVariableEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { EnvironmentVariableEdit.ShowWindow(message.CoinKernelVm, message.EnvironmentVariable); }); }); VirtualRoot.Window <InputSegmentEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { InputSegmentEdit.ShowWindow(message.CoinKernelVm, message.Segment); }); }); VirtualRoot.Window <CoinKernelEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { CoinKernelEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.Window <CoinEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { CoinEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.Window <ShowContainerWindowCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { ContainerWindow window = ContainerWindow.GetWindow(message.Vm); window?.ShowWindow(); }); }); VirtualRoot.Window <GroupEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { GroupEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.Window <KernelInputEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { KernelInputEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.Window <KernelOutputFilterEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { KernelOutputFilterEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.Window <KernelOutputTranslaterEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { KernelOutputTranslaterEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.Window <KernelOutputEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { KernelOutputEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.Window <ShowPackagesWindowCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { PackagesWindow.ShowWindow(); }); }); VirtualRoot.Window <KernelEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { KernelEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.Window <ShowLogColorCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { LogColor.ShowWindow(); }); }); VirtualRoot.Window <ShowGpuProfilesPageCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { GpuProfilesPage.ShowWindow(message.MinerClientsWindowVm); }); }); VirtualRoot.Window <PackageEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { PackageEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.Window <PoolKernelEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { PoolKernelEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.Window <PoolEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { PoolEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.Window <SysDicItemEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { SysDicItemEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.Window <SysDicEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { SysDicEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.Window <UserEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { UserEdit.ShowWindow(message.FormType, message.Source); }); }); VirtualRoot.Window <WalletEditCommand>(LogEnum.DevConsole, action: message => { UIThread.Execute(() => { WalletEdit.ShowWindow(message.FormType, message.Source); }); }); }
public ActionResult AddWork(int GroupNo, int PersonNo, string WorkName, int WorkTypeNo, DateTime StartDate, DateTime EndDate, GroupEdit group) { var EntityFmWork = new Work() { PersonNo = PersonNo, GroupNo = GroupNo, WorkTypeNo = WorkTypeNo, WorkDesc = WorkName, StartDate = StartDate, EndDate = EndDate, SystemDate = DateTime.Now }; unitOfWork.WorkRepository.Add(EntityFmWork); unitOfWork.Save(); ViewBag.ListOfWorkByGroup = ListOfWorkByGroup(GroupNo); return(ViewEditGroup(GroupNo, new GroupEdit())); }