private void btnAddAddressBook_Click(object sender, EventArgs e) { if (lstBankName.SelectedIndex == -1) { glb_function.MsgBox("لايمكن اضافة دليل عناوين حتى يتم حفظ بيانات البنك"); return; } File.frmContacts frm = new File.frmContacts(); frm.txtADB_NAME.Text = lstBankName.Text.Trim(); frm.ShowDialog(); if (frm.txtSWID.Text.Trim() == "") { glb_function.MsgBox("لم يتم حفظ العنوان"); return; } ConnectionToDB cnn = new ConnectionToDB(); DataTable dt = cnn.GetDataTable("select nvl(max(swid),0)+1 from BANK_ADDRESS"); int icheck = cnn.TranDataToDB("insert into BANK_ADDRESS values (" + dt.Rows[0][0].ToString() + "," + lstBankName.SelectedValue.ToString() + "," + frm.txtSWID.Text.Trim() + ")"); if (icheck <= 0) { glb_function.MsgBox("حدث خطأ اثناء عملية حفظ العنوان"); return; } cnn.glb_commitTransaction(); GetBankAddress(); }
private void btnContact_Click(object sender, EventArgs e) { File.frmContacts frm = new File.frmContacts(); frm.ShowDialog(); txtContactId.Text = frm.txtSWID.Text; txtContactName.Text = frm.txtADB_NAME.Text; }
private void btnFindAddress_Click(object sender, EventArgs e) { File.frmContacts frm = new File.frmContacts(); frm.ShowDialog(); txtVehicle_ADDRESS_ID.Text = frm.txtSWID.Text; txtVehicle_ADDRESS_name.Text = frm.txtADB_NAME.Text; }
private void btnFindContact_Click(object sender, EventArgs e) { File.frmContacts frm = new File.frmContacts(); frm.ShowDialog(); if (frm.txtSWID.Text.Trim() != "") { txtCONTACT_ID.Text = frm.txtSWID.Text; txtContactName.Text = frm.txtADB_NAME.Text; txtCustomerId.Text = ""; txtCUSTOMER_ACCID.Text = ""; } }
private void dgAddressBook_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex <= -1) { return; } if (e.ColumnIndex == clmJobButton.Index) { File.frmContacts frm = new File.frmContacts(); frm.txtSWID.Text = dgAddressBook[0, e.RowIndex].Value.ToString(); frm.ShowDialog(); } }