Beispiel #1
0
 private void UpdatePosts(ServiceInfoDataModel.PostSettings model)
 {
     ID            = model.ID;
     Name          = model.Name;
     PostType      = PersonalHandler.Instance.Model.PostTypes.First(p => p.ID == model.idPostType);
     StartWorkTime = model.TimeFrom;
     EndWorkTime   = model.TimeTo;
 }
Beispiel #2
0
        private void CompleteSave(object obj)
        {
            var post = new ServiceInfoDataModel.PostSettings();

            if (SelectedPost != null)
            {
                post.ID         = SelectedPost.ID;
                post.IDDep      = PersonalHandler.Instance.SelectedDep.id;
                post.idPostType = SelectedPost.PostType.ID;
                post.Name       = SelectedPost.Name;
                post.TimeFrom   = SelectedPost.StartWorkTime;
                post.TimeTo     = SelectedPost.EndWorkTime;
                PersonalHandler.Instance.EditPost(post);
            }
            SelectedPost        = null;
            CompleteSaveEnabled = false;
            VisAddPost          = Visibility.Visible;
        }
Beispiel #3
0
 /// <summary>
 /// Запрос на редактирование/добавление департамента
 /// </summary>
 /// <param name="model"></param>
 public void EditPost(ServiceInfoDataModel.PostSettings model)
 {
     SendRequest("UL" + JsonConvert.SerializeObject(model));
 }
Beispiel #4
0
 public PostViewModel(ServiceInfoDataModel.PostSettings model)
 {
     UpdatePosts(model);
     CurrentPost = model;
 }