private void btn_ƏlavəEt_Click(object sender, EventArgs e) { Frm_EmployeeFunc FrmEmployeeFunc = new Frm_EmployeeFunc(); DataTable dtDepart = new DataTable(); SqlDataAdapter daDepart = new SqlDataAdapter("Select DepartmentID,Name from Tbl_Department", Tools.Con); daDepart.Fill(dtDepart); FrmEmployeeFunc.cmb_Departament.DataSource = dtDepart; FrmEmployeeFunc.cmb_Departament.ValueMember = "DepartmentID"; FrmEmployeeFunc.cmb_Departament.DisplayMember = "Name"; DataTable dtSpecialty = new DataTable(); SqlDataAdapter daSpecialty = new SqlDataAdapter("Select SpecialtyID,SpecialtyName from Tbl_Specialty", Tools.Con); daSpecialty.Fill(dtSpecialty); FrmEmployeeFunc.cmb_Specialty.DataSource = dtSpecialty; FrmEmployeeFunc.cmb_Specialty.ValueMember = "SpecialtyID"; FrmEmployeeFunc.cmb_Specialty.DisplayMember = "SpecialtyName"; Tools.page = 0; FrmEmployeeFunc.btn_DaxilEt_Deyis.Text = "Daxil Et"; FrmEmployeeFunc.lbl_IsdenCixiwVaxti.Visible = false; FrmEmployeeFunc.dtp_IsdenCixisT.Visible = false; FrmEmployeeFunc.ShowDialog(); dataGridView_Employee.DataSource = EORM.Select(); }
private void btn_Deyis_Click(object sender, EventArgs e) { Frm_EmployeeFunc FrmEmployeeFunc = new Frm_EmployeeFunc(); DataTable dtDepart = new DataTable(); SqlDataAdapter daDepart = new SqlDataAdapter("Select DepartmentID,Name from Tbl_Department", Tools.Con); daDepart.Fill(dtDepart); FrmEmployeeFunc.cmb_Departament.DataSource = dtDepart; FrmEmployeeFunc.cmb_Departament.ValueMember = "DepartmentID"; FrmEmployeeFunc.cmb_Departament.DisplayMember = "Name"; DataTable dtSpecialty = new DataTable(); SqlDataAdapter daSpecialty = new SqlDataAdapter("Select SpecialtyID,SpecialtyName from Tbl_Specialty", Tools.Con); daSpecialty.Fill(dtSpecialty); FrmEmployeeFunc.cmb_Specialty.DataSource = dtSpecialty; FrmEmployeeFunc.cmb_Specialty.ValueMember = "SpecialtyID"; FrmEmployeeFunc.cmb_Specialty.DisplayMember = "SpecialtyName"; Tools.page = 1; FrmEmployeeFunc.id = (int)dataGridView_Employee.CurrentRow.Cells["EmployeeID"].Value; FrmEmployeeFunc.active = (bool)dataGridView_Employee.CurrentRow.Cells["Active"].Value; FrmEmployeeFunc.txt_Adi.Text = dataGridView_Employee.CurrentRow.Cells["Adı"].Value.ToString(); FrmEmployeeFunc.txt_Soyadi.Text = dataGridView_Employee.CurrentRow.Cells["Soyadı"].Value.ToString(); FrmEmployeeFunc.txt_Adress.Text = dataGridView_Employee.CurrentRow.Cells["Ünvan"].Value.ToString(); FrmEmployeeFunc.txt_IstifadeciAdi.Text = dataGridView_Employee.CurrentRow.Cells["İstifadəçi Adı"].Value.ToString(); FrmEmployeeFunc.txt_Parol.Text = dataGridView_Employee.CurrentRow.Cells["Şifrə"].Value.ToString(); FrmEmployeeFunc.cmb_Specialty.Text = dataGridView_Employee.CurrentRow.Cells["İxtisası"].Value.ToString(); FrmEmployeeFunc.txt_IsdenCixmaSebebi.Text = dataGridView_Employee.CurrentRow.Cells["Qeyd"].Value.ToString(); FrmEmployeeFunc.mskt_ElaqeNomresi.Text = dataGridView_Employee.CurrentRow.Cells["Əlaqə.No"].Value.ToString(); FrmEmployeeFunc.nud_IsTecrubesi.Text = dataGridView_Employee.CurrentRow.Cells["İş Təcrübəsi(İL)"].Value.ToString(); FrmEmployeeFunc.dtp_DogumT.Text = dataGridView_Employee.CurrentRow.Cells["Doğum T"].Value.ToString(); FrmEmployeeFunc.dtp_IseGirisT.Text = dataGridView_Employee.CurrentRow.Cells["İşə B.T"].Value.ToString(); FrmEmployeeFunc.gender = dataGridView_Employee.CurrentRow.Cells["Cinsiyət"].Value.ToString(); FrmEmployeeFunc.maritalstatus = dataGridView_Employee.CurrentRow.Cells["Ailə Vəziyyəti"].Value.ToString(); FrmEmployeeFunc.txt_FINKOD.Text = dataGridView_Employee.CurrentRow.Cells["FIN Kod"].Value.ToString(); FrmEmployeeFunc.cmb_Departament.Text = dataGridView_Employee.CurrentRow.Cells["Departament"].Value.ToString(); FrmEmployeeFunc.mt_SHVN.Text = dataGridView_Employee.CurrentRow.Cells["ŞV №"].Value.ToString(); FrmEmployeeFunc.txt_AtaAdi.Text = dataGridView_Employee.CurrentRow.Cells["Ata Adı"].Value.ToString(); FrmEmployeeFunc.txt_DogulduguYer.Text = dataGridView_Employee.CurrentRow.Cells["Doğulduğu Yer"].Value.ToString(); FrmEmployeeFunc.txt_Milliyeti.Text = dataGridView_Employee.CurrentRow.Cells["Milliyəti"].Value.ToString(); FrmEmployeeFunc.txt_EvTeli.Text = dataGridView_Employee.CurrentRow.Cells["Ev Telefonu"].Value.ToString(); FrmEmployeeFunc.txt_EPosta.Text = dataGridView_Employee.CurrentRow.Cells["Email"].Value.ToString(); FrmEmployeeFunc.mt_TeciliZngEdilecekSexsNo.Text = dataGridView_Employee.CurrentRow.Cells["Təcili Zng Ediləcək.No"].Value.ToString(); FrmEmployeeFunc.txt_TeciliZngEdilecekSexsinTelName.Text = dataGridView_Employee.CurrentRow.Cells["Təcili Zəng Ediləcək Şəxs"].Value.ToString(); FrmEmployeeFunc.txt_XariciSHVNo.Text = dataGridView_Employee.CurrentRow.Cells["Xarici PasportNo"].Value.ToString(); FrmEmployeeFunc.txt_SigortaNo.Text = dataGridView_Employee.CurrentRow.Cells["SığortaNo"].Value.ToString(); FrmEmployeeFunc.cmb_İslemeNovu.Text = dataGridView_Employee.CurrentRow.Cells["İşləmə Növü"].Value.ToString(); FrmEmployeeFunc.txt_EmekHaqqi.Text = dataGridView_Employee.CurrentRow.Cells["Əməkhaqqı"].Value.ToString(); FrmEmployeeFunc.cmb_IstirahetGunleri.Text = dataGridView_Employee.CurrentRow.Cells["İstirahət Günü"].Value.ToString(); FrmEmployeeFunc.txt_IsdenCixmaSebebi.Text = dataGridView_Employee.CurrentRow.Cells["İşdən Çıxma Səbəbi"].Value.ToString(); FrmEmployeeFunc.cmb_EmrinNo.Text = dataGridView_Employee.CurrentRow.Cells["ƏmrNo"].Value.ToString(); FrmEmployeeFunc.txt_EmrdeGosterilenler.Text = dataGridView_Employee.CurrentRow.Cells["Əmr"].Value.ToString(); FrmEmployeeFunc.txt_SelahiyyetliSexs.Text = dataGridView_Employee.CurrentRow.Cells["Səlahiyyətli Şəxs"].Value.ToString(); FrmEmployeeFunc.txt_BankaAdi.Text = dataGridView_Employee.CurrentRow.Cells["Bankın Adı"].Value.ToString(); FrmEmployeeFunc.txt_BankaSobeKodu.Text = dataGridView_Employee.CurrentRow.Cells["Bankın Şöbə Kodu"].Value.ToString(); FrmEmployeeFunc.txt_BankaHesabNo.Text = dataGridView_Employee.CurrentRow.Cells["Bankın Hesab №"].Value.ToString(); FrmEmployeeFunc.txt_IBANNo.Text = dataGridView_Employee.CurrentRow.Cells["IBAN"].Value.ToString(); FrmEmployeeFunc.cmb_Tehsili.Text = dataGridView_Employee.CurrentRow.Cells["Təhsil"].Value.ToString(); FrmEmployeeFunc.txt_TehsilAldigi_M.Text = dataGridView_Employee.CurrentRow.Cells["Təhsil Müəssisəsi"].Value.ToString(); FrmEmployeeFunc.cmb_HerbiMukellefiyyet.Text = dataGridView_Employee.CurrentRow.Cells["Hərbi Mükəlləfiyyət"].Value.ToString(); DataTable dt = EORM.SqlReader((int)dataGridView_Employee.CurrentRow.Cells["EmployeeID"].Value); byte[] sekil = (byte[])dt.Rows[0][1]; MemoryStream ms = new MemoryStream(sekil); FrmEmployeeFunc.pictureBox_Employee.Image = Image.FromStream(ms); FrmEmployeeFunc.btn_DaxilEt_Deyis.Text = "Dəyiş"; FrmEmployeeFunc.ShowDialog(); dataGridView_Employee.DataSource = EORM.Select(); }