public Task <int> SavecampaignAsync(CommentsDatabase comment)
 {
     if (comment.CommentID != 0)
     {
         return(CommentsDatabase.UpdateAsync(comment));
     }
     else
     {
         return(CommentsDatabase.InsertAsync(comment));
     }
 }
Esempio n. 2
0
 public SelectedCampaignPage(campaignDatabase campaignDatabase)
 {
     InitializeComponent();
     campaignDatabaseObj      = campaignDatabase;
     CommentsDatabaseObj      = new CommentsDatabase();
     BindingContext           = new CommentsDatabase();
     CampaignImagePath.Source = campaignDatabaseObj.CampaignImagePath;
     CampaignName.Text        = campaignDatabaseObj.CampaignName;
     CampaignAveREview.Text   = "" + campaignDatabaseObj.CampaignAveREview;
     VIPPrice.Text            = "" + campaignDatabaseObj.CampaignVIPPrice;
     BusinessPrice.Text       = "" + campaignDatabaseObj.CampaignBusPrice;
     Economyprice.Text        = "" + campaignDatabaseObj.CampaignEcoPrice;
 }
 public Task <int> DeletecampaignAsync(CommentsDatabase comment)
 {
     return(CommentsDatabase.DeleteAsync(comment));
 }