Exemplo n.º 1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            var en = new UpdateAppointmentEntity();
            var re = new UpdateAppointmentRepo();

            en.AppNo = this.mgvUpdateAppoinment.CurrentRow.Cells["id"].Value.ToString();
            re.Delete(en);
        }
Exemplo n.º 2
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            var re = new UpdateAppointmentRepo();
            var en = new UpdateAppointmentEntity();

            en.Name   = txtName.Text;
            en.Doctor = txtDoctor.Text;
            en.AppNo  = txtAppointment.Text;
            re.Search(mgvUpdateAppoinment, en);
        }
Exemplo n.º 3
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            var en = new UpdateAppointmentEntity();
            var re = new UpdateAppointmentRepo();

            en.Name      = mgvUpdateAppoinment.CurrentRow.Cells["name"].Value.ToString();
            en.Age       = int.Parse(mgvUpdateAppoinment.CurrentRow.Cells["age"].Value.ToString());
            en.Sex       = mgvUpdateAppoinment.CurrentRow.Cells["sex"].Value.ToString();
            en.Reference = mgvUpdateAppoinment.CurrentRow.Cells["reference"].Value.ToString();
            en.Date      = mgvUpdateAppoinment.CurrentRow.Cells["date"].Value.ToString();
            en.AppNo     = mgvUpdateAppoinment.CurrentRow.Cells["id"].Value.ToString();
            en.Time      = mgvUpdateAppoinment.CurrentRow.Cells["time"].Value.ToString();
            en.Doctor    = mgvUpdateAppoinment.CurrentRow.Cells["doctor"].Value.ToString();

            re.Update(en, mgvUpdateAppoinment);
        }