private void btn_DepartmanDemirbasKisi_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { if (string.IsNullOrEmpty(txt_Adet.Text) || int.Parse(txt_Adet.Text) <= 0) { throw new Exception("Lütfen Demirbaş Adedini Kontrol Ediniz !"); } if (departmanId == 0 || demirbasId == 0) { throw new Exception("Lütfen Departman Ve Demirbaş Seçimlerinizi Kontrol Ediniz Bu Değerler Boş Geçilemez !"); } int adet = int.Parse(txt_Adet.Text); if (adet > secilenAdet) { throw new Exception("Adet Bilgisi Var Olan Adetten Sayısından Büyük Girilemez!"); } DepartmanPersonelController.DepartmanaDemirbasEkle(demirbasId, departmanId, adet); MessageBox.Show("İşlem Başarılı !", "Başarılı !", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("Eklendi"); } catch (Exception ex) { MessageBox.Show(ex.Message, "Dikkat !", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void DepartmanZimmetGetirForm_Load(object sender, EventArgs e) { var departmanAdi = DepartmanController.DepartmanDetayiGetir(_departmanId); var personelAdi = DepartmanPersonelController.DepartmanSorumlulariListele().FirstOrDefault(x => x.Departman.DepartmanId == _departmanId); lbl_DepartmanAdi.Text = "Departman Adı: " + departmanAdi.Departman.DepartmanAdi; lbl_DepartmanSorumlu.Text = "Departman Sorumlusu: " + personelAdi.Personel.Ad + " " + personelAdi.Personel.Soyad; GetValue(); }
private void gridView_DepartmanDemirbaslari_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { int demirbasDepartmanNo = Convert.ToInt32(gridView_DepartmanDemirbaslari.GetRowCellValue(gridView_DepartmanDemirbaslari.FocusedRowHandle, "DemirbasDepartmanId").ToString()); string demirbasAdi = gridView_DepartmanDemirbaslari.GetRowCellValue(gridView_DepartmanDemirbaslari.FocusedRowHandle, "DemirbasAdi").ToString(); DialogResult sonuc = MessageBox.Show(demirbasAdi + " Demirbaşı Silinsin Mi?", "Uyarı !", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (sonuc == DialogResult.Yes) { DepartmanPersonelController.departmanDemirbasSil(demirbasDepartmanNo); GetValue(); } }
private void DepartmanSorumluListeleForm_Load(object sender, EventArgs e) { var result = DepartmanPersonelController.DepartmanSorumlulariListele(); DataTable dt = new DataTable("departmanSorumlulari"); dt.Columns.Add("AdSoyad", typeof(string)); dt.Columns.Add("PersonelId", typeof(int)); dt.Columns.Add("DepartmanAdi", typeof(string)); dt.Columns.Add("DepartmanId", typeof(int)); foreach (var item in result) { dt.Rows.Add(item.Personel.Ad + " " + item.Personel.Soyad, item.Personel.PersonelId, item.Departman.DepartmanAdi, item.Departman.DepartmanId); } grid_DepartmanYetkilileri.DataSource = dt; gridView_DepartmanYetkilileri.Columns["DepartmanId"].Visible = false; gridView_DepartmanYetkilileri.Columns["PersonelId"].Visible = false; }