internal int SaveProcess3(DoctorsProcess3 dp3) { try { connection.Open(); command = new SqlCommand("sp_doctorProcess3", connection); command.Parameters.Add("@doctorEmail", SqlDbType.NVarChar).Value = dp3.DoctorEmail; command.Parameters.Add("@days", SqlDbType.NVarChar).Value = dp3.Days; command.Parameters.Add("@hospitalNmae", SqlDbType.NVarChar).Value = dp3.HospitalName; command.Parameters.Add("@chamberName", SqlDbType.NVarChar).Value = dp3.ChamberName; command.Parameters.Add("@startTime", SqlDbType.NVarChar).Value = dp3.StartTime; command.Parameters.Add("@endTime", SqlDbType.NVarChar).Value = dp3.EndTime; command.Parameters.Add("@newVisit", SqlDbType.NVarChar).Value = dp3.NewVisit; command.Parameters.Add("@oldVisit", SqlDbType.NVarChar).Value = dp3.OldVisit; command.Parameters.Add("@district", SqlDbType.NVarChar).Value = dp3.District; command.Parameters.Add("@subDistrict", SqlDbType.NVarChar).Value = dp3.SubDistrict; command.CommandType = CommandType.StoredProcedure; row = command.ExecuteNonQuery(); } finally { connection.Close(); } return(row); }
protected void btnProcess3_Click(object sender, EventArgs e) { DoctorsProcess3 dp3 = new DoctorsProcess3(); if (Session["DoctorEmail"] != null) { dp3.DoctorEmail = Session["DoctorEmail"].ToString(); dp3.Days = ddlDay.SelectedItem.Value; dp3.HospitalName = txtHospital.Text; dp3.ChamberName = txtChamber.Text; dp3.District = txtDistrict.Text.Trim(); dp3.SubDistrict = txtSubDistrict.Text.Trim(); dp3.StartTime = ddlStartTime.SelectedItem.Value; dp3.EndTime = ddlEndTime.SelectedItem.Value; dp3.NewVisit = txtNewPatientVisit.Text; dp3.OldVisit = txtOldPatientVisit.Text; int rowCount = _dpManager.SaveProcess3(dp3); if (rowCount > 0) { Response.Redirect("DoctorProcess4.aspx"); } } }
internal int SaveProcess3(DoctorsProcess3 dp3) { return(_dpGateway.SaveProcess3(dp3)); }