Example #1
0
 private void AcceptEvent()
 {
     acceptBtn.ServerClick += delegate
     {
         var apps = new Project_Dll.Appointment(Session["appid"].ToString());
         apps.updateField("status", "accepted", apps.Id);
         Session["message"] = new HtmlElements().GetMesage("", HtmlElements.MessageType.SUCCESS, HtmlElements.UserType.DOCTOR);
         Response.Redirect(new NavClass().DoctorHome);
     };
 }
Example #2
0
        private void LoadAppointment(string appId)
        {
            Session["appid"] = appId;
            var apps = new Project_Dll.Appointment(appId);
            //var patientDetails = new User_details_view().Load_record_with(User_details_view_support.Column.Id, User_details_view_support.LogicalOperator.EQUAL_TO, apps.Patient_id);
            var patientDetails = new User_details_view().getAllRecords().Where(u => u.Id == apps.Patient_id).FirstOrDefault();
            //var doctor = new Doctor_view().Load_record_with(Doctor_view_support.Column.Id, Doctor_view_support.LogicalOperator.EQUAL_TO, apps.Doctor_id);
            var doctor = new Doctor_view().getAllRecords().Where(d => d.Id == apps.Doctor_id).FirstOrDefault();
            var date   = DateTime.Parse(apps.Schedule_date + " " + (apps.Set_time + ":00"));

            AppointmentLiteral.Text = $"{date.Year}/{date.Month}/{date.Day}/{date.Hour}/A{appId}/D{doctor.Id}";
            name.InnerText          = patientDetails.Name;
            desc.InnerText          = apps.Descritpion;
            address.InnerText       = patientDetails.Address;
            dTime.InnerText         = $"{date.ToLongDateString()} { apps.Set_time}";
        }
Example #3
0
        void LoadAppointments()
        {
            var d     = string.Empty;
            var index = 0;

            var Apps = new Project_Dll.Appointment().getAllRecords().Where(a => a.Doctor_id == SV.Uid && DateTime.Parse(a.Schedule_date) >= DateTime.Now).ToList();

            foreach (var app in Apps)
            {
                if (app.Status != "pending")
                {
                    continue;
                }
                index++;
                var patient = new Patient_view().getAllRecords().Where(p => p.Id == app.Patient_id).FirstOrDefault();
                d += $"<tr><td>{index}</td><td><a href='../../doctor/appointment?appid={enc.EncryptString(app.Id, SV.LoginKey)}'>{patient.Name}</a></td><td>{app.Descritpion}</td><td>{app.Schedule_date}</td><td>{app.Set_time}</td></tr>";
            }
            NewAppointmentsLiteral.Text = index.ToString();
            AppLiteral.Text             = d;
        }