11 Ağustos 2019 Pazar

C# Sinema Otomasyonu Satis Listeleme

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp2
{
    public partial class frmSatisListeleme : Form
    {
        public frmSatisListeleme()
        {
            InitializeComponent();
        }
        sinemaTableAdapters.Satis_BilgileriTableAdapter satislarlistesi = new sinemaTableAdapters.Satis_BilgileriTableAdapter();
        private void button1_Click(object sender, EventArgs e)
        {
            Environment.Exit(0);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Form2 ll = new Form2();
            ll.ShowDialog();
        }

        private void button3_Click(object sender, EventArgs e)
        {
           

        }

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

           
        }

        private void frmSatisListeleme_Load(object sender, EventArgs e)
        {
         
         dataGridView1.DataSource = satislarlistesi.TariheGoreListele2(dateTimePicker1.Text);
            ToplamUcretHesapla();

        }

        private void ToplamUcretHesapla()
        {
            int ucrettoplami = 0;
            for (int i = 0; i < dataGridView1.Rows.Count; i++)
            {
                ucrettoplami += Convert.ToInt32(dataGridView1.Rows[i].Cells["Ucret"].Value);
            }
            label1.Text = "Toplan Satış=" + ucrettoplami + "TL";
        }




        private void button3_Click_1(object sender, EventArgs e)
        {
            dataGridView1.DataSource = satislarlistesi.SatisListesi2();
            ToplamUcretHesapla();
        }

        private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
        {
           
          dataGridView1.DataSource = satislarlistesi.TariheGoreListele2(dateTimePicker1.Text);
            ToplamUcretHesapla();
        }
    }
}

Hiç yorum yok:

Yorum Gönder