//Delete=============== public int delete() { DB_Operations db = new DB_Operations(); try { string sql = "DELETE FROM NeerogaUsers WHERE UserID = " + UserID; return(db.exeQuery(sql)); } catch (Exception ex) { throw ex; } }
//update====== public int update() { DB_Operations db = new DB_Operations(); try { string sql = "UPDATE NeerogaUsers SET UserName = '******', Password = '******',UserType = '" + UserType + "', Age = " + Age + ", City = '" + City + "' , Gender = '" + Gender + "' , TP_Number = " + TP_No + " ,Category = '" + Category + "' where UserID = " + UserID + " "; return(db.exeQuery(sql)); } catch (Exception ex) { throw ex; } }
//insert======= public int AddAppointment() { DB_Operations db = new DB_Operations(); try { string sql = "insert into Appointments values (" + AppointmentID + ", " + PatientID + ",'" + Date + "'," + DoctorID + ", '" + Time + "')"; return(db.exeQuery(sql)); } catch (Exception ex) { throw ex; } }
//Create an User================= public int Create() { DB_Operations db = new DB_Operations(); try { string sql = "insert into NeerogaUsers values (" + UserID + ", '" + UserName + "','" + Password + "','" + UserType + "', " + Age + ", '" + City + "' , '" + Gender + "' , " + TP_No + " , '" + Category + "')"; return(db.exeQuery(sql)); } catch (Exception ex) { throw ex; } }
public int AddRecord() { DB_Operations db = new DB_Operations(); try { string sql = "insert into PatientRecords values (" + AppointmentID + ", '" + Record + "')"; return(db.exeQuery(sql)); } catch (Exception ex) { throw ex; } }
public int Pay() { DB_Operations db = new DB_Operations(); try { string sql = "insert into Payments values (" + PaymentID + ", " + PatientID + "," + AppointmentID + ",'" + Date + "' , " + TotalAmount + ", " + PaidAmount + " , " + Balance + ")"; return(db.exeQuery(sql)); } catch (Exception ex) { throw ex; } }
//Add Patient================= public int Add() { DB_Operations db = new DB_Operations(); try { string sql = "insert into PatientDetails values (" + PatientID + ", '" + PatientName + "','" + PatientContact + "'," + PatientAge + ")"; return(db.exeQuery(sql)); } catch (Exception ex) { throw ex; } }
//update public int update() { DB_Operations db = new DB_Operations(); try { string sql = "UPDATE Doctor_Availability SET Monday = '" + Monday + "',Tuesday = '" + Tuesday + "', Wednesday = '" + Wednesday + "', Thursday = '" + Thursday + "' , Friday = '" + Friday + "' , Saturday = '" + Saturday + "' ,Sunday = '" + Sunday + "' where UserID = " + DoctorID + " "; return(db.exeQuery(sql)); } catch (Exception ex) { throw ex; } }
//Add public int Add() { DB_Operations db = new DB_Operations(); try { string sql = "insert into Doctor_Availability values ( " + DoctorID + ",'" + Monday + "','" + Tuesday + "' ,'" + Wednesday + "' ,'" + Thursday + "' ,'" + Friday + "' ,'" + Saturday + "' ,'" + Sunday + "')"; return(db.exeQuery(sql)); } catch (Exception ex) { throw ex; } }