예제 #1
0
 private void btnGrvYenile_Click(object sender, EventArgs e)
 {
     try
     {
         dtgvGrvli.DataSource = db.grvListeleme();
     }
     catch (Exception hata)
     {
         MessageBox.Show(hata.Message);
     }
 }
예제 #2
0
        private void maliye_Load(object sender, EventArgs e)
        {
            if (maliyeGo == "var")
            {
                try
                {
                    MaliyeListe();
                    MaliyeLogListe();

                    this.dtgvMaliye.Columns["SorumluID"].Visible   = false;
                    this.dtgvMaliye.Columns["Aciklama"].Visible    = false;
                    this.dtgvMaliye.Columns["Makbuz"].Visible      = false;
                    this.dtgvMaliye.Columns["OlusturanID"].Visible = false;



                    this.dtgvMaliyeLog.Columns[0].Visible = false;
                    this.dtgvMaliyeLog.Columns[4].Visible = false;

                    for (int i = 5; i < 18; i++)
                    {
                        this.dtgvMaliyeLog.Columns[i].Visible = false;
                    }

                    this.dtgvMaliyeLog.Columns[10].Visible = true;
                    this.dtgvMaliyeLog.Columns[11].Visible = true;


                    dtgvMaliyeLog.Columns[1].HeaderText  = "Rapor NO";
                    dtgvMaliyeLog.Columns[2].HeaderText  = "Yeni Sorumlu Kişi";
                    dtgvMaliyeLog.Columns[3].HeaderText  = "Eski Sorumlu Kişi";
                    dtgvMaliyeLog.Columns[10].HeaderText = "Yeni Tutar";
                    dtgvMaliyeLog.Columns[11].HeaderText = "Eski Tutar";



                    DataTable dt4 = db.grvListeleme();
                    dtgvUyeArama.DataSource = dt4;

                    this.dtgvUyeArama.Columns[0].Visible = false;
                    for (int i = 3; i < 22; i++)
                    {
                        this.dtgvUyeArama.Columns[i].Visible = false;
                    }



                    olusturan   = AnaForm.Ad + " " + AnaForm.Soyad;
                    olusturanID = AnaForm.grvID;


                    this.dtgvUyeArama.Columns["KullaniciAd"].Visible = false;
                    this.dtgvUyeArama.Columns["Sifre"].Visible       = false;
                }
                catch (Exception hata)
                {
                    MessageBox.Show(hata.Message);
                }
            }
            else
            {
                dtgvMaliye.Enabled    = false;
                dtgvMaliyeLog.Enabled = false;
                dtgvUyeArama.Enabled  = false;
                btnSorumlu.Enabled    = false;
            }

            if (maliyeKay == "var")
            {
                btnGozat.Enabled      = true;
                btnYukle.Enabled      = true;
                btnUyeDuzenle.Enabled = true;
            }
            else
            {
                btnUyeDuzenle.Enabled = false;
                btnGozat.Enabled      = false;
                btnYukle.Enabled      = false;
            }
        }