Beispiel #1
0
        public void ProcessCellSelection(string column, RequestsInfo info)
        {
            switch (column)
            {
            case "Назва":
                var res = PostgresService.Instance.GetRequestById(info.Request_Name);
                Storage.GetInstance().ChangeSelectedRequest(res);
                NavigationManager.Instance.Navigate(ModesEnum.Request);
                break;

            case "Замовник":
                //NavigationManager.Instance.Navigate(ModesEnum.Request);
                break;

            case "Інженер":
                var engineer = PostgresService.Instance.GetEngineer(info.Engineer_Id);
                Storage.GetInstance().ChangeSelectedEngineer(engineer);
                NavigationManager.Instance.Navigate(ModesEnum.Enginner);
                break;

            case "Бригадир":
                //NavigationManager.Instance.Navigate(ModesEnum.Request);
                break;

            default:
                break;
            }
        }
Beispiel #2
0
        /// <summary>
        /// Updates context when a user leaves corresponding view.
        /// </summary>
        public override void UpdateContext()
        {
            RequestsInfo info = new RequestsInfo();

            info.Service        = View.Service;
            info.ServiceAddress = View.ServiceAddress;
            ContextController.UpdateRequestsInfo(info);
        }
Beispiel #3
0
 /// <summary>
 /// Updates report information.
 /// </summary>
 /// <param name="info"></param>
 public static void UpdateRequestsInfo(RequestsInfo info)
 {
     _context.RequestsInfo = info;
 }