Beispiel #1
0
        public static IsDTO GetAll()
        {
            IsDTO dto = new IsDTO();

            dto.Departmanlar = DepartmanDAO.DepartmanGetir();
            dto.Pozisyonlar  = PozisyonDAO.PozisyonGetir();
            dto.Personeller  = PersonelDAO.PersonelGetir();
            dto.Durumlar     = IsDAO.DurumGetir();
            dto.Isler        = IsDAO.IsGetir();
            return(dto);
        }
        private void FrmIsBilgileri_Load(object sender, EventArgs e)
        {
            cmbIsDurum.Visible = false;
            label9.Visible     = false;
            dto = IsBLL.GetAll();
            dataGridView1.DataSource            = dto.Personeller;
            dataGridView1.Columns[0].Visible    = false;
            dataGridView1.Columns[1].HeaderText = "User No";
            dataGridView1.Columns[2].HeaderText = "Ad";
            dataGridView1.Columns[3].HeaderText = "Soyad";
            dataGridView1.Columns[4].Visible    = false;
            dataGridView1.Columns[5].Visible    = false;
            dataGridView1.Columns[6].Visible    = false;
            dataGridView1.Columns[7].Visible    = false;
            dataGridView1.Columns[8].Visible    = false;
            dataGridView1.Columns[9].Visible    = false;
            dataGridView1.Columns[10].Visible   = false;
            dataGridView1.Columns[11].Visible   = false;
            dataGridView1.Columns[12].Visible   = false;
            dataGridView1.Columns[13].Visible   = false;
            cmbDepartman.DataSource             = dto.Departmanlar;
            cmbDepartman.DisplayMember          = "DepartmanAd";
            cmbDepartman.ValueMember            = "ID";
            cmbDepartman.SelectedIndex          = -1;
            if (dto.Departmanlar.Count > 0)
            {
                combofull = true;
            }
            cmbPozisyon.DataSource    = dto.Pozisyonlar;
            cmbPozisyon.DisplayMember = "PozisyonAd";
            cmbPozisyon.ValueMember   = "ID";
            cmbPozisyon.SelectedIndex = -1;

            if (isUpdate)
            {
                cmbIsDurum.Visible       = false;
                label9.Visible           = false;
                txtAd.Text               = detay.Ad;
                txtSoyad.Text            = detay.Soyad;
                txtUserNo.Text           = detay.UserNo.ToString();
                txtIcerik.Text           = detay.Icerik;
                txtBaslik.Text           = detay.Baslik;
                cmbIsDurum.DataSource    = dto.Durumlar;
                cmbIsDurum.DisplayMember = "IsDurumAd";
                cmbIsDurum.ValueMember   = "ID";
                cmbIsDurum.SelectedValue = detay.IsDurumID;
            }
        }
 private void doldur()
 {
     dto = IsBLL.GetAll();
     dataGridView1.DataSource             = dto.Isler;
     dataGridView1.Columns[0].HeaderText  = "Başlık";
     dataGridView1.Columns[1].HeaderText  = "User No";
     dataGridView1.Columns[2].HeaderText  = "Ad";
     dataGridView1.Columns[3].HeaderText  = "Soyad";
     dataGridView1.Columns[4].HeaderText  = "Departman";
     dataGridView1.Columns[5].HeaderText  = "Pozisyon";
     dataGridView1.Columns[6].Visible     = false;
     dataGridView1.Columns[7].Visible     = false;
     dataGridView1.Columns[8].Visible     = false;
     dataGridView1.Columns[9].Visible     = false;
     dataGridView1.Columns[10].HeaderText = "Durumu";
     dataGridView1.Columns[11].Visible    = false;
     dataGridView1.Columns[12].Visible    = false;
     dataGridView1.Columns[13].Visible    = false;
     dataGridView1.Columns[14].Visible    = false;
     cmbDepartman.DataSource    = dto.Departmanlar;
     cmbDepartman.DisplayMember = "DepartmanAd";
     cmbDepartman.ValueMember   = "ID";
     cmbDepartman.SelectedIndex = -1;
     if (dto.Departmanlar.Count > 0)
     {
         combofull = true;
     }
     cmbPozisyon.DataSource    = dto.Pozisyonlar;
     cmbPozisyon.DisplayMember = "PozisyonAd";
     cmbPozisyon.ValueMember   = "ID";
     cmbPozisyon.SelectedIndex = -1;
     cmbIsDurum.DataSource     = dto.Durumlar;
     cmbIsDurum.DisplayMember  = "DurumAd";
     cmbIsDurum.ValueMember    = "ID";
     cmbIsDurum.SelectedIndex  = -1;
 }