コード例 #1
0
        //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;
            }
        }
コード例 #2
0
        //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;
            }
        }
コード例 #3
0
        //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;
            }
        }
コード例 #4
0
        //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;
            }
        }
コード例 #6
0
        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;
            }
        }
コード例 #7
0
        //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;
            }
        }
コード例 #8
0
        //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;
            }
        }
コード例 #9
0
        //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;
            }
        }