Browse Source

PRS MOBILE - restored Save Progress button

Nick-PRSDigital@bitbucket.org 2 năm trước cách đây
mục cha
commit
27ad40c721

+ 2 - 2
prs.mobile/comal.timesheets/DigitalForms/DigitalFormHost.xaml

@@ -13,8 +13,8 @@
             <Button Grid.Column="0" HorizontalOptions="Start" VerticalOptions="Center" TextColor="White" BackgroundColor="Transparent" Margin="0" Padding="0"
                 Text="Cancel" Clicked="ExitBtn_Clicked"/>
             <Label x:Name="titleLbl" Grid.Column="1" Text="Edit Form" HorizontalOptions="Fill" HorizontalTextAlignment="Center" VerticalOptions="Fill" VerticalTextAlignment="Center" TextColor="White"/>
-            <!-- <Button x:Name="saveProgressBtn" Grid.Column="2" HorizontalOptions="Center" VerticalOptions="Center" TextColor="White" BackgroundColor="Transparent" Margin="0" Padding="0" -->
-            <!--     Text="Save Progress" Clicked="SaveProgressBtn_Clicked" FontAttributes="Bold" IsVisible="true"/> -->
+             <Button x:Name="saveProgressBtn" Grid.Column="2" HorizontalOptions="Center" VerticalOptions="Center" TextColor="White" BackgroundColor="Transparent" Margin="0" Padding="0" 
+                 Text="Save Progress" Clicked="SaveProgressBtn_Clicked" FontAttributes="Bold" IsVisible="true"/> 
             <Button Grid.Column="2" HorizontalOptions="End" VerticalOptions="Center" TextColor="White" BackgroundColor="Transparent" Margin="0" Padding="0"
                     x:Name="saveBtn"
                 Text="Complete" Clicked="SaveBtn_Clicked"/>

+ 11 - 11
prs.mobile/comal.timesheets/DigitalForms/DigitalFormHost.xaml.cs

@@ -71,17 +71,17 @@ namespace comal.timesheets
             Navigation.PopAsync();
         }
 
-        // private async void SaveProgressBtn_Clicked(object sender, EventArgs e)
-        // {
-        //     if (!readOnly)
-        //     {
-        //         using (await MaterialDialog.Instance.LoadingDialogAsync(message: "Saving Progress"))
-        //         {
-        //             viewer.SaveData(true);
-        //         }
-        //     }
-        //     Navigation.PopAsync();
-        // }
+        private async void SaveProgressBtn_Clicked(object sender, EventArgs e)
+        {
+            if (!readOnly)
+            {
+                using (await MaterialDialog.Instance.LoadingDialogAsync(message: "Saving Progress"))
+                {
+                    viewer.SaveData(true);
+                }
+            }
+            Navigation.PopAsync();
+        }
 
         private void SaveBtn_Clicked(object sender, EventArgs e)
         {