Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = Convert.ToInt16(Session["user"].ToString());

            Functions.Functions fun = new Functions.Functions();
            fun.RetriveAppointments(id, appContainer);
        }
Exemplo n.º 2
0
        protected void update_btn_Click(object sender, EventArgs e)
        {
            byte[] bytes;
            bool   result;
            string DR_ID = Session["userID"].ToString();
            int    Dr_ID = Convert.ToInt16(DR_ID);

            Functions.Functions heartdoctors = new Functions.Functions();
            if (imgUploader.PostedFile != null)
            {
                using (BinaryReader br = new BinaryReader(imgUploader.PostedFile.InputStream))
                {
                    bytes = br.ReadBytes(imgUploader.PostedFile.ContentLength);
                }
                result = heartdoctors.UpdateInfo(Dr_ID, price, Departments.SelectedItem.Text, availableTime, specilized.Text, Address.Text, bytes);
                if (result == true)
                {
                    successAlert.Attributes.Remove("hidden");
                    updateForm.Visible = false;
                }
            }
            else
            {
                result = heartdoctors.UpdateInfo(Dr_ID, price, Departments.SelectedItem.Text, availableTime, specilized.Text, Address.Text, null);

                if (result == true)
                {
                    successAlert.Attributes.Remove("hidden");
                    updateForm.Visible = false;
                }
            }
        }
        /// <summary>
        /// Inventory required functions from file
        /// </summary>
        public void InventoryRequiredFunctionsFromTextFile(string filePath, Functions.Functions functions, List <string> functionsNotFound)
        {
            string t = hoReverse.hoUtils.HoUtil.ReadAllText(filePath);

            if (t == "")
            {
                return;
            }
            string s = HoService.DeleteComment(t);

            Regex rgx   = new Regex(@"(\w+)\(", RegexOptions.Multiline);
            Match match = rgx.Match(s);

            while (match.Success)
            {
                string       functionCode = match.Groups[1].Value;
                FunctionItem functionItem;
                if (functions.FunctionList.TryGetValue(functionCode, out functionItem))
                {
                    // function found
                    RequiredFunctionAdd(functionItem);
                }
                else
                {
                    // function not found
                    if (!functionsNotFound.Contains(functionCode))
                    {
                        functionsNotFound.Add($@"{functionCode}");
                    }
                    //MessageBox.Show($"Function: '{functionCode}' not found in file\r\n'{filePath}'", "Function not find");
                }
                match = match.NextMatch();
            }
            return;
        }
Exemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Functions.Functions function = new Functions.Functions();
     function.CallUsers(doctorsTable, modalImage, con, 1);
     function.CallUsers(nursesTable, modalImage, con, 2);
     function.CallPatients(patients);
 }
Exemplo n.º 5
0
        protected void report_btn_modal_Click(object sender, EventArgs e)
        {
            Functions.Functions function = new Functions.Functions();
            int id = Convert.ToInt16(Session["user"].ToString());
            midLineDBEntities db = new midLineDBEntities();
            var newReport        = new Report
            {
                ReportedUserID = Convert.ToInt16(Session["reportedUser"].ToString()),
                UserID         = id,
                ReportText     = item_notes.InnerText.ToString()
            };

            db.Reports.Add(newReport);
            db.SaveChanges();
            report_alert.Attributes.Remove("hidden");
        }
Exemplo n.º 6
0
        protected void Login_Click(object sender, EventArgs e)
        {
            if (username.Text != "" && username.Text != null)
            {
                var myUser = new User
                {
                    Username = username.Text,

                    Password = pass.Text
                };

                midLineDBEntities db          = new midLineDBEntities();
                var currentUser               = db.Users.Where(x => x.Username == username.Text).FirstOrDefault();
                Functions.Functions login_fun = new Functions.Functions();
                if (login_fun.login(myUser) == 1 || login_fun.login(myUser) == 2)
                {
                    Session["LoggedIn"] = 1;
                    Response.Redirect("DrsHome.aspx");
                }
                else if (login_fun.login(myUser) == 3)
                {
                    Session["LoggedIn"] = 3;
                    Response.Redirect("homePage.aspx");
                }
                else if (login_fun.login(myUser) == 4)
                {
                    Response.Redirect("AdminHome.aspx");
                }
                else
                {
                    errorValid.Attributes.Remove("hidden");
                }
            }
            else
            {
                errorRequired.Attributes.Remove("hidden");
            }
        }
Exemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            midLineDBEntities db = new midLineDBEntities();
            string            Id = Session["user"].ToString();
            int id;
            int type = 0;

            if (Id != null && Id != "")
            {
                id = Convert.ToInt16(Id);
                var user = db.Users.Where(x => x.Id == id).FirstOrDefault();
                if (user.UserType == 1)
                {
                    type = 1;
                    commentBox.Attributes.Remove("hidden");
                }
                if (user.UserType == 2)
                {
                    type = 2;
                    commentBox.Attributes.Remove("hidden");
                }
                if (user.UserType == 3)
                {
                    type = 3;
                }
                if (user.UserType == 4)
                {
                    type = 4;
                }
            }
            else
            {
                type = 5;
            }
            Functions.Functions functions = new Functions.Functions();
            functions.RetrivePosts(mainBox, type);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     Functions.Functions heartdoctors = new Functions.Functions();
     heartdoctors.RetriveDoctors(OrthoDoctors, "قسم العظام");
 }
Exemplo n.º 9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Functions.Functions function = new Functions.Functions();
     function.RetriveAdminPosts(posts);
 }
Exemplo n.º 10
0
 protected void search_Click(object sender, EventArgs e)
 {
     Functions.Functions heartdoctors = new Functions.Functions();
     heartdoctors.RetriveDoctorsFilter(OtherDoctors, "أقسام اخرى", city.SelectedItem.Text);
 }
Exemplo n.º 11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Functions.Functions heartdoctors = new Functions.Functions();
     heartdoctors.RetriveDoctors(OtherDoctors, "أقسام اخرى");
 }
Exemplo n.º 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Functions.Functions heartdoctors = new Functions.Functions();
     heartdoctors.RetriveDoctors(heartDoctors, "قسم القلب");
     Session["userId"] = Session["userId"];
 }
Exemplo n.º 13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Functions.Functions function = new Functions.Functions();
     function.CallReports(reportsTable);
 }
Exemplo n.º 14
0
 protected void search_Click(object sender, EventArgs e)
 {
     Functions.Functions heartdoctors = new Functions.Functions();
     heartdoctors.RetriveDoctorsFilter(Nursing, "قسم التمريض المنزلي", city.SelectedItem.Text);
 }
Exemplo n.º 15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Functions.Functions heartdoctors = new Functions.Functions();
     heartdoctors.RetriveDoctors(Nursing, "قسم التمريض المنزلي");
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     Functions.Functions heartdoctors = new Functions.Functions();
     heartdoctors.RetriveDoctors(PediaDoctors, "قسم الأطفال");
 }
 protected void search_Click(object sender, EventArgs e)
 {
     Functions.Functions heartdoctors = new Functions.Functions();
     heartdoctors.RetriveDoctorsFilter(PediaDoctors, "قسم الأطفال", city.SelectedItem.Text);
 }
Exemplo n.º 18
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Functions.Functions functions = new Functions.Functions();
     functions.call_messages(mainContent);
 }