Пример #1
0
        public List <DoctorCard> GetOtherDeptDoctors(Options opt, DoctorEndPoint ep)
        {
            opt.Listing_type = "promoted_doctors_in_department_in_a_city";
            var others = ep.GetDoctors(opt, 0, 6);

            return(others);
        }
Пример #2
0
        public List <Comment> GetComments(Options opt, DoctorEndPoint ep)
        {
            opt.Listing_type = "comments_by_city_and_dept";
            var comments = ep.GetComments(opt, 0, 4);

            return(comments);
        }
Пример #3
0
        public List <DoctorCard> GetDeptDoctors(Options opt, DoctorEndPoint ep, List <DoctorCard> promoted)
        {
            opt.Listing_type = "all_doctors_in_department_in_a_city";
            var others = ep.GetDoctorsEclude(opt, 0, 10, promoted);

            return(others);
        }
Пример #4
0
        public DoctorCard GetDoctorCard(Options opt, DoctorEndPoint ep)
        {
            opt.Listing_type = "doctor_with_id";
            var others = ep.GetDoctors(opt, 0, 1);

            return(others[0]);
        }
Пример #5
0
        public List <Comment> GetComments(Options opt, DoctorEndPoint ep)
        {
            opt.Listing_type = "comments_by_doc_id";
            var comments = ep.GetComments(opt, 0, 6);

            return(comments);
        }
Пример #6
0
        public DoctorProfile(Options opt)
        {
            int lang_id = 1;

            if (opt.Lang == "ar")
            {
                lang_id = 0;
            }

            var app = new MainApp();
            var doc = new DoctorEndPoint();

            /* since the url does not indicate which city or dept */
            opt.Department     = doc.GetDoctorDept(opt.DocId)[1];
            opt.City           = doc.GetDocCity(opt.DocId, "en");
            opt.Country        = "sa";
            this.UserId        = doc.GetDoctorUserId(opt.DocId);
            this.comments      = GetComments(opt, doc);
            this.offers        = GetDoctorOffers(opt, doc);
            this.engagment     = GetEngagments(opt, doc);
            this.info          = GetDoctorCard(opt, doc);
            this.ActivePackage = doc.HasActivePackage(opt.DocId);
            if (!this.ActivePackage)
            {
                this.otherdoctors = GetOtherDoctors(opt, doc);
            }
            else
            {
                this.otherdoctors = new List <DoctorCard>();
            }

            this.cities           = app.Set_cities(opt.Lang, opt.Cities);
            this.DocRatingDetails = doc.GetDoctorGradeDetails(opt.DocId);
            this.info.City_name   = opt.City;
            this.info.Dept_name   = opt.Department;
            this.info.City_name   = doc.GetDocCity(opt.DocId, opt.Lang);
            this.info.Dept_name   = doc.GetDoctorDept(opt.DocId)[lang_id];
            this.city             = doc.GetDocCity(opt.DocId, "en").ToLower();
            this.country          = "sa";
            opt.City         = this.city.ToLower();
            opt.Country      = this.country.ToLower();
            this.departments = app.GetDepartments(opt);
            if (this.info.ShowMob != "N")
            {
                this.ShowMobile = true;
                this.Call       = this.info.Call;
            }
            else
            {
                this.ShowMobile = false;
            }
            this.info.Inst_names = doc.AcceptFormAppointment(this.info.Inst_names);
            foreach (var i in this.info.Inst_names)
            {
                if (i.AccetFormApnt)
                {
                    this.AcceptApnt = true;
                }
            }
        }
Пример #7
0
        public List <DoctorCard> GetInstDoctors(Options opt, DoctorEndPoint ep)
        {
            opt.Listing_type = "doctors_within_inst";
            var others = ep.GetDoctors(opt, 0, 12);

            return(others);
        }
Пример #8
0
        public List <DoctorCard> GetOtherDoctors(Options opt, DoctorEndPoint ep)
        {
            /* get doctors ased on doctor's department */

            opt.Listing_type = "doctors_in_given_department_and_city_of_doctor";
            var others = ep.GetDoctors(opt, 0, 6);

            return(others);
        }
Пример #9
0
        public List <DoctorCard> GetOtherDoctors(Options opt, DoctorEndPoint ep)
        {
            /* get doctors ased on doctor's department */

            opt.Listing_type = "doctors_rated_by_user_id";
            var others = ep.GetDoctors(opt, 0, 6);

            return(others);
        }
Пример #10
0
        public Home(Options opt)
        {
            var app  = new MainApp();
            var inst = new InstituteEndPoint();
            var doc  = new DoctorEndPoint();

            this.institutes  = inst.GetInstitutes(opt, 0, 6);
            this.doctors     = doc.GetDoctors(opt, 0, 6);
            this.cities      = app.Set_cities(opt.Lang, opt.Cities);
            this.departments = app.GetDepartments(opt);
        }
Пример #11
0
        public UserProfile(Options opt)
        {
            var app = new MainApp();
            var doc = new DoctorEndPoint();

            opt.Country    = "sa";
            this.comments  = GetComments(opt, doc);
            this.engagment = GetEngagments(opt, doc);
            this.info      = GetUserInfo(opt, app);
            this.doctors   = GetOtherDoctors(opt, doc);
            this.cities    = app.Set_cities(opt.Lang, opt.Cities);
        }
Пример #12
0
        public DepartmentProfile(Options opt)
        {
            var app = new MainApp();
            var doc = new DoctorEndPoint();

            this.department_name = doc.GetDeptArabicName(opt.Department);
            this.icon            = opt.Department.Replace(' ', '_') + ".png";
            //this.comments = GetComments(opt, doc);
            this.offers    = GetDoctorOffers(opt, doc);
            this.engagment = GetEngagments(opt, doc);

            this.otherdoctors = GetOtherDeptDoctors(opt, doc);
            this.doctors      = GetDeptDoctors(opt, doc, this.otherdoctors);
            this.info         = GetDepartmentInfo(opt, app);
            this.cities       = app.Set_cities(opt.Lang, opt.Cities);
            this.departments  = app.GetDepartments(opt);
        }
Пример #13
0
        public InstituteProfile(Options opt)
        {
            var app  = new MainApp();
            var doc  = new DoctorEndPoint();
            var inst = new InstituteEndPoint();

            this.comments       = GetComments(opt, doc);
            this.offers         = GetDoctorOffers(opt, inst);
            this.engagment      = GetEngagments(opt, doc);
            this.doctors        = GetInstDoctors(opt, doc);
            this.info           = GetInstituteCard(opt, inst);
            this.cities         = app.Set_cities(opt.Lang, opt.Cities);
            this.city           = inst.GetInstCity(this.info.Id, "en").ToLower();
            this.country        = "sa";
            opt.City            = this.city.ToLower();
            opt.Country         = this.country.ToLower();
            this.departments    = app.GetDepartments(opt);
            this.info.City_name = inst.GetInstCity(this.info.Id, opt.Lang);
        }
Пример #14
0
 public Engagment GetEngagments(Options opt, DoctorEndPoint ep)
 {
     return(null);
 }
Пример #15
0
 public List <Offer> GetDoctorOffers(Options opt, DoctorEndPoint ep)
 {
     return(null);
 }
Пример #16
0
 public List <Comment> GetComments(Options opt, DoctorEndPoint ep)
 {
     return(null);
 }