protected void btn_update_Click( object sender, EventArgs e ) { string pid = this.lbl_pid.Text; string name = this.lbl_name.Text; string gender = this.lbl_gender.Text; string tempdate = this.lbl_date.Text; string tempage = this.lbl_age.Text; string medical = this.txtbox_medical.Text; BusinessTier.DoctorOperation doctor = new BusinessTier.DoctorOperation(); if ( pid.Length > 0 && name.Length > 0 && gender.Length > 0 && tempdate.Length > 0 && tempage.Length > 0 && medical.Length > 0 ) { try { DateTime date = DateTime.Parse(tempdate); int age = int.Parse(tempage); doctor.UpdatePatientByID(name, gender, date.Date, age, medical, pid); } catch ( Exception ex ) { this.lbl_error.Text = ex.Message; } } else if ( medical.Length == 0 ) { this.lbl_medicalwarning.Text = "This filed is required!"; } else { this.lbl_error.Text = "Please select your patient first"; } }
protected void btn_myassigns_Click( object sender, EventArgs e ) { defaultstatus(); string roleID = this.lbl_docID.Text.ToString().ToUpper(); Data.DataBase.SelectAllAssignmentDetailsDataTable table = new Data.DataBase.SelectAllAssignmentDetailsDataTable(); BusinessTier.DoctorOperation doctor = new BusinessTier.DoctorOperation(); table = doctor.SelectAssignmentDetailsByRole(roleID); this.gv_myassignview.DataSource = table; this.gv_myassignview.DataBind(); }