예제 #1
0
        private async void Initialize()
        {
            IsBusy          = true;
            AvailableGroups = await _groupDataService.GetGroupsAvailableForUser(AccountHelper.GetCurrentUserId());

            AvailableTaskStatuses = await _taskItemDataService.GetAvailableTaskStatuses();

            SelectedTaskStatus = AvailableTaskStatuses.First();
            SelectedGroup      =
                AvailableGroups.SingleOrDefault(g => g.GroupName.Contains(Constants.DefaultGroupForUserNamePrefix));

            if (_associatedTaskItem != null)
            {
                Id                 = _associatedTaskItem.Id;
                Name               = _associatedTaskItem.Name;
                Description        = _associatedTaskItem.Description;
                SelectedTaskStatus = _availableTaskStatuses.Single(s => s.Id == _associatedTaskItem.TaskStatusId);
                SelectedGroup      = _availableGroups.Single(g => g.Id == _associatedTaskItem.GroupId);
                StartDateTime      = _associatedTaskItem.StartDateTime.Value;
                EndDateTime        = _associatedTaskItem.EndDateTime.Value;
                IsCompleted        = _associatedTaskItem.IsCompleted;
                IsDeleted          = _associatedTaskItem.IsDeleted;
            }
            IsBusy = false;
        }
예제 #2
0
        private async void SyncDutyGroups()
        {
            var directory = Directory.CreateDirectory(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Iterations", "Common"));

            //TODO: add proper factory infrastructure
            LocalStorageProvider storage = new LocalStorageProvider();

            StorageResult = await storage.StoreGroups(AvailableGroups.ToList(), directory.FullName);
        }
예제 #3
0
        private void AddNewDutyGroup(string name)
        {
            if (!string.IsNullOrEmpty(name))
            {
                AvailableGroups.Add(new DutyGroup()
                {
                    Name = name
                });

                SyncDutyGroups();
            }
        }
예제 #4
0
        public void LoadAvailableGroups(int selectedretailclusterid, string groupname)
        {
            Group s;

            AvailableGroups.Clear();
            client = new SQSAdminServiceClient();
            client.Endpoint.Address = new System.ServiceModel.EndpointAddress(CommonVariables.WcfEndpoint);
            DataSet ds = client.SQSAdmin_StudioM_GetAvailableGroupListForRetailCluster(selectedretailclusterid, groupname);

            client.Close();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                s           = new Group();
                s.GroupID   = int.Parse(dr["groupid"].ToString());
                s.GroupName = dr["groupname"].ToString();
                AvailableGroups.Add(s);
            }
        }