private void Old_Visits_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Delete && DGV_Chronic.SelectedRows.Count > 0) { if (MessageBox.Show(" تأكيد عملية الحذف ؟ ", "عملية الحذف ", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes) { OV.Delete_Chronic(Int32.Parse(this.DGV_Chronic.CurrentRow.Cells[0].Value.ToString())); Fill_DGV_Chronic(); Btn_USymptoms.Enabled = false; DGV_Chronic.ClearSelection(); } } }
private void DGV_Chronic_DoubleClick(object sender, EventArgs e) { try { if (DGV_Chronic.SelectedRows.Count == 0) { return; } Rtext_Uchronics.Text = DGV_Chronic.CurrentRow.Cells[1].Value.ToString(); Btn_USymptoms.Enabled = true; DGV_Chronic.ClearSelection(); } catch (Exception ex) { } }
private void Btn_USymptoms_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(Rtext_Uchronics.Text)) { MessageBox.Show("لا يمكن ارسال بيانات فارغة ", "تحذير", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); return; } try { OV.Update_Visits(Convert.ToInt32(DGV_Chronic.CurrentRow.Cells[0].Value.ToString()), Rtext_Uchronics.Text); Rtext_Uchronics.ResetText(); Fill_DGV_Chronic(); MessageBox.Show("تمت عملية التعديل بنجاح", "عملية التعديل ", MessageBoxButtons.OK, MessageBoxIcon.Information); Btn_USymptoms.Enabled = false; DGV_Chronic.ClearSelection(); } catch (Exception ex) { } }
private void Frm_Print_Report_Load(object sender, EventArgs e) { try { lbl_Name.Text = Properties.Settings.Default.Name.ToString(); Lbl_Number.Text = Properties.Settings.Default.Number.ToString(); Lbl_Email.Text = Properties.Settings.Default.Email.ToString(); Lbl_Time.Text = Convert.ToString(DateTime.Now.ToString("ss : mm : hh tt")); Lbl_Histort.Text = Convert.ToString(DateTime.Now.ToString("dd / MM / yyyy")); Fill_Details_Visiting(); Fill_Count(); Fill_Chronic(); Fill_Doctor_Cost(); Fill_Details_Paient(); DGV_Reports.ClearSelection(); DGV_Chronic.ClearSelection(); } catch (Exception ex) { } }
private void Com_RPaient_SelectedIndexChanged(object sender, EventArgs e) { try { if (Convert.ToInt32(Com_RPaient.SelectedValue) != 0) { MTxt_Birthday.Visible = true; Com_Patient = Convert.ToInt32(Com_RPaient.SelectedValue); } Fill_Details_Visiting(); Fill_Count(); Fill_Chronic(); Fill_Doctor_Cost(); Fill_Details_Paient(); Btn_PReport.Enabled = true; DGV_Chronic.ClearSelection(); DGV_Reports.ClearSelection(); } catch (Exception ex) { } Lbl_Doctor.Focus(); }
private void Old_Visits_Load(object sender, EventArgs e) { try { Fill_DGV_Chronic(); Fill_DGV_Information(); DataTable dt = new DataTable(); dt = OV.Old_Visits1(VisitsForm.Com_patients); RText_Doctor.Text = dt.Rows[0][1].ToString(); RText_Name.Text = dt.Rows[0][0].ToString(); RText_Approximate.Text = dt.Rows[0][2].ToString(); RText_Balance.Text = dt.Rows[0][3].ToString(); DGV_OldVisits.ClearSelection(); DGV_Chronic.ClearSelection(); } catch (Exception ex) { } }
private void Old_Visits_MouseEnter(object sender, EventArgs e) { DGV_OldVisits.ClearSelection(); DGV_Chronic.ClearSelection(); }