Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
2
2018-app-inutralia
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
inutralia
2018-app-inutralia
Commits
9f1201b6
Commit
9f1201b6
authored
Jan 22, 2020
by
gema
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
campos obligatorios para que no envien campos vacíos.
parent
dc40bd25
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
CreateNutriQuestion.xaml.cs
...inutralia/Views/NutriQuestion/CreateNutriQuestion.xaml.cs
+11
-0
DetailsNutriQuestionListView.xaml.cs
.../Views/NutriQuestion/DetailsNutriQuestionListView.xaml.cs
+7
-0
No files found.
inutralia/inutralia/Views/NutriQuestion/CreateNutriQuestion.xaml.cs
View file @
9f1201b6
...
...
@@ -34,6 +34,13 @@ namespace inutralia.Views.NutriQuestion
var
messageValue
=
consultaEditor
.
Text
;
if
(
subjectValue
==
null
||
messageValue
==
null
)
{
await
DisplayAlert
(
"Fallo"
,
"El campo asunto y consulta no pueden ir vacíos. Son campos obligatorios."
,
"Entendido"
);
}
else
{
await
ViewModel
.
SaveData
(
subjectValue
,
messageValue
);
await
DisplayAlert
(
"Exito"
,
"El mensaje se ha enviado correctamente."
,
"Entendido"
);
...
...
@@ -41,6 +48,10 @@ namespace inutralia.Views.NutriQuestion
(
App
.
Current
.
MainPage
as
RootPage
).
Navigate
<
HomeView
>();
}
}
catch
(
Exception
)
{
await
DisplayAlert
(
"Error"
,
"Se ha producido un error. Por favor, intentelo más tarde"
,
"Entendido"
);
...
...
inutralia/inutralia/Views/NutriQuestion/DetailsNutriQuestionListView.xaml.cs
View file @
9f1201b6
...
...
@@ -30,13 +30,20 @@ namespace inutralia.Views.NutriQuestion
try
{
var
messageValue
=
messageEntry
.
Text
;
if
(
messageValue
==
null
)
{
await
DisplayAlert
(
"Fallo"
,
"No se puede enviar un mensaje en blanco, campo obligatorio"
,
"Entendido"
);
}
else
{
await
ViewModel
.
saveData
(
messageValue
);
await
DisplayAlert
(
"Exito"
,
"El mensaje se ha enviado correctamente."
,
"Entendido"
);
(
App
.
Current
.
MainPage
as
RootPage
).
Navigate
<
HomeView
>();
}
}
catch
(
Exception
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment