示例#1
0
        private void btn_DemirbasEkle_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(cmb_Sirket.SelectedValue.ToString()))
                {
                    throw new Exception("Lütfen Fakülte ve Departman Bilgilerini Kontrol Ediniz !");
                }

                if (string.IsNullOrEmpty(txt_Adet.Text) || short.Parse(txt_Adet.Text) < 0)
                {
                    throw new Exception("Lütfen Adet Bilgisini Kontrol Ediniz !");
                }

                DemirbasController.DemirbasGuncelle(demirbasNo, Convert.ToInt32(cmb_Sirket.SelectedValue.ToString()), Convert.ToInt32(cmb_Departments.SelectedValue.ToString()), Convert.ToInt32(txt_Adet.Text), txt_Aciklama.Text);
                MessageBox.Show("İşlem Başarılı !", "Başarılı !", MessageBoxButtons.OK, MessageBoxIcon.Information);
                DemirbasGetir();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Dikkat !", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }