Beispiel #1
0
        private void UpdateMK_Click(object sender, EventArgs e)
        {
            if (this.textBox3.Text == "" || this.textBox4.Text == "")
            {
                MessageBox.Show("Insert data");
            }
            else
            {
                MarketingR i = new MarketingR();
                i.CampaignId = Convert.ToInt32(this.textBox3.Text);
                i.Budget     = Convert.ToInt32(this.textBox4.Text);

                FinanceRepository fr = new FinanceRepository();

                if (fr.UpdateBudget(i))
                {
                    MarketingRepository mr    = new MarketingRepository();
                    List <MarketingR>   iList = mr.GetAllApprovedCampaignAnd();
                    this.dataGrid2.DataSource = iList;
                    this.textBox3.Text        = "";
                    this.textBox4.Text        = "";
                }
                else
                {
                    MessageBox.Show("Insufficient Balance");
                    // MessageBox.Show("Can Not Update Campaign", "Update Error");
                }
            }
        }
Beispiel #2
0
        private void marketingAllowTab_Click(object sender, EventArgs e)
        {
            this.groupBox1.Visible = false;
            this.groupBox2.Visible = true;
            this.groupBox3.Visible = false;
            this.groupBox4.Visible = false;

            this.dataGrid.Visible  = false;
            this.dataGrid2.Visible = true;
            this.dataGrid3.Visible = false;

            MarketingRepository mr        = new MarketingRepository();
            List <MarketingR>   allResult = mr.GetAllApprovedCampaignAnd();

            this.dataGrid2.DataSource = allResult;
        }