Beispiel #1
0
        private void fillData()
        {
            // Object of campaign 1
            campaignDatabase campaign1 = new campaignDatabase();

            campaign1.CampaignName      = "Name1";
            campaign1.CampaignNoStars   = 3;
            campaign1.CampaignMinPrice  = 8000;
            campaign1.CampaignImagePath = "camp1.png";
            campaign1.likeRate          = 7.3;
            //Adding campaign 1
            campaignList.Add(campaign1);

            // Object of campaign 2
            campaignDatabase campaign2 = new campaignDatabase();

            campaign2.CampaignName      = "Name2";
            campaign2.CampaignNoStars   = 2;
            campaign2.CampaignMinPrice  = 10000;
            campaign2.CampaignImagePath = "camp2.png";
            campaign1.likeRate          = 7.3;

            //Adding campaign 2
            campaignList.Add(campaign2);
        }
Beispiel #2
0
 public Task <int> SavecampaignAsync(campaignDatabase campaign)
 {
     if (campaign.CampaignID != 0)
     {
         return(Campaigndatabase.UpdateAsync(campaign));
     }
     else
     {
         return(Campaigndatabase.InsertAsync(campaign));
     }
 }
Beispiel #3
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;
 }
Beispiel #4
0
 public Task <int> DeletecampaignAsync(campaignDatabase campaign)
 {
     return(Campaigndatabase.DeleteAsync(campaign));
 }
 public EnterCampaignData()
 {
     InitializeComponent();
     campaignDatabaseObj = new campaignDatabase();
 }
        private void fillData()
        {
            // Object of campaign 1
            campaignDatabase campaign1 = new campaignDatabase();

            campaign1.CampaignName = "AlFerdous";
            campaign1.CampaignCountryOfResidence = "Saudi Arabia";
            campaign1.CampaignImagePath          = "frdos.png";
            campaign1.CampaignNoStars            = 4;
            campaign1.CampaignAvaVIP             = 5;
            campaign1.CampaignVIPPrice           = 20000;
            campaign1.CampaignAvaEco             = 10;
            campaign1.CampaignEcoPrice           = 7500;
            campaign1.CampaignAvaBus             = 2;
            campaign1.CampaignBusPrice           = 15000;
            campaign1.CampaignAveREview          = 7.3;
            //Adding campaign 1
            SaudicampaignList.Add(campaign1);


            // Object of campaign 2
            campaignDatabase campaign2 = new campaignDatabase();

            campaign2.CampaignName = "AlBsha'ar";
            campaign2.CampaignCountryOfResidence = "Saudi Arabia";
            campaign2.CampaignImagePath          = "Bshr.png";
            campaign2.CampaignNoStars            = 2;
            campaign2.CampaignAvaVIP             = 1;
            campaign2.CampaignVIPPrice           = 5000;
            campaign2.CampaignAvaEco             = 10;
            campaign2.CampaignEcoPrice           = 1500;
            campaign2.CampaignAvaBus             = 2;
            campaign2.CampaignBusPrice           = 3000;
            campaign2.CampaignAveREview          = 3.3;
            //Adding campaign 2
            SaudicampaignList.Add(campaign2);


            // Object of campaign 3
            campaignDatabase campaign3 = new campaignDatabase();

            campaign3.CampaignName = "AlFajer";
            campaign3.CampaignCountryOfResidence = "Egypt";
            campaign3.CampaignImagePath          = "fjr.png";
            campaign3.CampaignNoStars            = 5;
            campaign3.CampaignAvaVIP             = 10;
            campaign3.CampaignVIPPrice           = 25000;
            campaign3.CampaignAvaEco             = 10;
            campaign3.CampaignEcoPrice           = 9500;
            campaign3.CampaignAvaBus             = 5;
            campaign3.CampaignBusPrice           = 15000;
            campaign3.CampaignAveREview          = 9.5;
            //Adding campaign 3
            EygptcampaignList.Add(campaign3);

            // Object of campaign 4
            campaignDatabase campaign4 = new campaignDatabase();

            campaign4.CampaignName = "AlSedrah";
            campaign4.CampaignCountryOfResidence = "Egypt";
            campaign4.CampaignImagePath          = "sdra.png";
            campaign4.CampaignNoStars            = 3;
            campaign4.CampaignAvaVIP             = 5;
            campaign4.CampaignVIPPrice           = 7000;
            campaign4.CampaignAvaEco             = 5;
            campaign4.CampaignEcoPrice           = 1500;
            campaign4.CampaignAvaBus             = 0;
            campaign4.CampaignBusPrice           = 3500;
            campaign4.CampaignAveREview          = 6.3;
            //Adding campaign 4
            EygptcampaignList.Add(campaign4);
        }
Beispiel #7
0
 public CheckCampaignDatabase()
 {
     InitializeComponent();
     BindingContext = new campaignDatabase();
 }