Пример #1
0
        private ViewResult RejectColumnRequest(ColumnRequest columnRequest)
        {
            columnRequest.Status = ColumnRequestStatus.Rejected;
            columnRequestsRepo.EditColumnRequest(columnRequest);

            Alert.Add(this, AlertType.Error, "Kolumna odbijena.");
            return(Column());
        }
Пример #2
0
        private void EditExistingColumnRequest(ColumnRequest columnRequest, string command)
        {
            if (columnRequest.Status != ColumnRequestStatus.Rejected &&
                columnRequest.Status != ColumnRequestStatus.Approved)
            {
                if (command == "saveAndSend")
                {
                    Alert.Add(this, AlertType.Success, "Kolumna uspješno spremljena i poslana na pregled.");
                    columnRequest.Status        = ColumnRequestStatus.Pending;
                    columnRequest.DateRequested = DateTime.Now;
                }

                columnRequestsRepository.EditColumnRequest(columnRequest);
            }
            else
            {
                Alert.Add(this, AlertType.Error,
                          "Greška",
                          "Mogu se uređivati samo skice ");
            }
        }