Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            Doctor d = (Doctor)Session["doctor"];
            HelloLabel.Text = d.CDoctorName;
            Pharmcy.PharmcyWS webser = new Pharmcy.PharmcyWS();
            DataSet           ds     = webser.GetMedinceNameAndId();
            List <ListItem>   LI     = GetAllData.getListItemsForDDL(ds, "Medicine");
            foreach (ListItem l in LI)
            {
                MedicineNameDDL.Items.Add(l);
            }
            MedicineNameDDL.DataBind();

            UserService us = new UserService();
            ds = us.GetUserNameAndId();
            LI = GetAllData.getListItemsForDDL(ds, "User");
            foreach (ListItem l in LI)
            {
                UserNameDDL.Items.Add(l);
            }
            UserNameDDL.DataBind();
        }
    }
Exemplo n.º 2
0
 protected void ShowNewMessageDoctorGrid_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "AnswerDoctor")
     {
         int     rowNumber = Convert.ToInt32(e.CommandArgument);
         int     MessageId = Convert.ToInt32(ShowNewMessageDoctorGrid.Rows[rowNumber].Cells[0].Text);
         Message m         = GetAllData.GetAllDataFromMessageForAnswer(MessageId, "user");
         m.CMessageDoctorId         = ShowNewMessageDoctorGrid.Rows[rowNumber].Cells[1].Text;
         Session["newMessage"]      = m;
         UserAnswerL.Visible        = true;
         UserAnswerO.Visible        = true;
         UserAnswerTB.Visible       = true;
         UserAnswerTB.Text          = "";
         UndoMessageButton.Visible  = true;
         ResetMessageButton.Visible = true;
         SendMessageButton.Visible  = true;
         UserAnswerO.Text           = "";
     }
     if (e.CommandName == "DeleteDoctorMessage")
     {
         int            rowNumber = Convert.ToInt32(e.CommandArgument);
         int            MessageId = Convert.ToInt32(ShowNewMessageDoctorGrid.Rows[rowNumber].Cells[0].Text);
         MessageService ms        = new MessageService();
         ms.DeleteMessage(MessageId);
         ChooseNewMessage_SelectedIndexChanged(sender, e);
     }
 }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Manager m = (Manager)Session["manager"];
         HelloLabel.Text = m.CManagerName;
         GetAllData.Appointment();
         AppointmentService ap         = new AppointmentService();
         string             whereclout = " WHERE DoctorId=ApointmentDoctorId and UserId=ApointmentUserId and HourNumber=ApointmentHour and ApointmentDay=DayId";
         string             order      = "";
         string             tabels     = "Apointment,Users,Hours,Doctors,Days";
         string             s          = "SELECT ApointmentId,ApointmentDoctorId,ApointmentUserId,ApointmentHour,ApointmentDate,UserName,HourNumber,HourStartTime,HourEndTime,DoctorName,DayName FROM " + tabels;
         s += whereclout;
         DataSet ds = ap.GetApointmentAndSort(s, tabels, order);
         //check if the dayaset isnt empty, if so, put the data in the gridview
         if (ds.Tables[0].Rows.Count != 0)
         {
             ShowAppointment.Visible    = true;
             ShowAppointment.DataSource = ds;
             ShowAppointment.DataBind();
         }
         else
         {
             Response.Write("<script>alert('לא נמצאו תורים')</script>");
         }
     }
 }
Exemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        User u = (User)Session["user"];

        HelloLabel.Text = u.CUserName;
        GetAllData.VacationsForDoctor();
        GetAllData.Appointment();
        AppointmentService appser = new AppointmentService();
        string             s = "", tables = "Apointment,Doctors,Speciality,Hours,Days";

        s                 = "SELECT ApointmentId,ApointmentDate,ApointmentHour,DoctorName,HourStartTime,HourEndTime,SpecialityName,DayName FROM " + tables;
        s                += " WHERE ApointmentHour=HourNumber and ApointmentDoctorId=DoctorId and SpecialityId=DoctorSpecailty and ApointmentDay=DayId and ApointmentUserId='" + u.CUserId + "'";
        Session["s"]      = s;
        Session["tabels"] = tables;
        DataSet ds = appser.GetApointmentAndSort(s, tables, "");

        if (ds.Tables[0].Rows.Count != 0)
        {
            CloseApointment.Visible   = true;
            SortDDL.Visible           = true;
            ApointmentGrid.Visible    = true;
            ApointmentGrid.DataSource = ds;
            ApointmentGrid.DataBind();
        }
        else
        {
            Response.Write("<script>alert('לא נמצאו תורים')</script>");
        }
    }
        async void Init()
        {
            data = await Api.AllData();

            if (data != null)
            {
                lblCases.Text       = data.cases.ToString("n0");
                lblDeath.Text       = data.deaths.ToString("n0");
                lblRecovered.Text   = data.recovered.ToString("n0");
                lblTodayCases.Text  = data.todayCases.ToString("n0");
                lblTodayDeath.Text  = data.todayDeaths.ToString("n0");
                lblActiveCases.Text = data.active.ToString("n0");
            }

            countryList = await Api.GetCountryData();

            if (countryList != null)
            {
                listView.ItemsSource = countryList.OrderByDescending(q => q.cases).Take(100);
            }

            AdmobControl admobControl = new AdmobControl()
            {
                AdUnitId = AppConstants.BannerId
            };

            st_admob.Children.Add(admobControl);
        }
Exemplo n.º 6
0
        public static async Task <GetAllData> AllData()
        {
            GetAllData model = new GetAllData();

            try
            {
                var stringJSON = await Task.Run(() => JsonConvert.SerializeObject(null));


                JObject jsonData = await ApiQuery("v2/all", stringJSON);

                if (jsonData != null) // hata alınmamışsa
                {
                    model.cases               = jsonData["cases"].Value <double>();
                    model.todayCases          = jsonData["todayCases"].Value <double>();
                    model.deaths              = jsonData["deaths"].Value <double>();
                    model.todayDeaths         = jsonData["todayDeaths"].Value <double>();
                    model.recovered           = jsonData["recovered"].Value <double>();
                    model.active              = jsonData["active"].Value <double>();
                    model.critical            = jsonData["critical"].Value <double>();
                    model.casesPerOneMillion  = jsonData["casesPerOneMillion"].Value <double>();
                    model.deathsPerOneMillion = jsonData["deathsPerOneMillion"].Value <double>();
                    model.tests               = jsonData["tests"].Value <double>();
                    model.testsPerOneMillion  = jsonData["testsPerOneMillion"].Value <double>();
                    model.affectedCountries   = jsonData["affectedCountries"].Value <double>();
                }
            }
            catch (Exception ex)
            {
            }

            return(model);
        }
Exemplo n.º 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Doctor d = (Doctor)Session["doctor"];
         HelloLabel.Text = d.CDoctorName;
         GetAllData.VacationsForDoctor();
         GetAllData.Appointment();
     }
 }
Exemplo n.º 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //put the exit button in the menu
        //
        //EXIT BUTTON
        //the exit button will delete the user shopping bag(set the value to be null)
        //and doesnt change the current stock of the medicine.
        //
        //do a method that rrecives object, the session value of myShoppingbag will be an object
        //and a shopping bag variable.
        if (!Page.IsPostBack)
        {
            if (Session["myShoppingBag"] == null)
            {
                //create shopping list
                Session["myShoppingBag"] = new ShoppingBag();
            }
            else
            {
                myShoppingBag = (ShoppingBag)Session["myShoppingBag"];
            }
            if (Session["presList"] == null)
            {
                Session["presList"] = new List <DataSet>();
            }
            else
            {
                presList = (List <DataSet>)Session["presList"];
            }

            //put the catagorys and the producers in the DDL
            Pharmcy.PharmcyWS webser = new Pharmcy.PharmcyWS();
            DataSet           pro = webser.GetProducer(), cat = webser.GetCatagory();
            List <ListItem>   proList = GetAllData.getListItemsForDDL(pro, "MedicineProducer");
            List <ListItem>   catList = GetAllData.getListItemsForDDL(cat, "MedicineCatagory");
            foreach (ListItem l in proList)
            {
                ProducerDDL.Items.Add(l);
            }
            foreach (ListItem l in catList)
            {
                DropDownListMedicineCatagory.Items.Add(l);
            }
        }
        CheckoutButton.Visible = true;
        SeeShoppingBag.Visible = true;
        User u = (User)Session["user"];

        if (u == null)
        {
            CheckoutButton.Visible = false;
            SeeShoppingBag.Visible = false;
        }
    }
Exemplo n.º 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Doctor d = (Doctor)Session["doctor"];

        HelloLabel.Text = d.CDoctorName;
        DoctorService docser = new DoctorService();
        DataSet       ds     = docser.GetDoctorCityName(d.CDoctorId);

        ShowCity.Text      = ds.Tables[0].Rows[0]["CityName"].ToString();
        ShowId.Text        = d.CDoctorId;
        ShowName.Text      = d.CDoctorName;
        ShowGender.Text    = d.CDoctorGender;
        ShowBirthday.Text  = Convert.ToString(d.CDoctorBirthday);
        ShowSpecailty.Text = ds.Tables[0].Rows[0]["SpecialityName"].ToString();
        ShowLice.Text      = Convert.ToString(d.CDoctorLicense);
        ShowPassword.Text  = d.CDoctorPassword;
        if (d.CDoctorIsOnVacation == true)
        {
            showVacation.Text = "כן";
        }
        else
        {
            showVacation.Text = "לא";
        }
        ShowPhone.Text = d.CDoctorPhone;
        ShowUni.Text   = d.CDoctorUniversity;
        if (!Page.IsPostBack)
        {
            string      cityname = "", specName = "";
            int         cityid;
            DataSet     temp = docser.GetSpec();
            UserService us   = new UserService();
            ds = us.GetCity();
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                cityid   = Convert.ToInt32(ds.Tables[0].Rows[i]["CityId"].ToString()) - 1;
                cityname = ds.Tables[0].Rows[i]["CityName"].ToString();
                DropDownList1.Items.Insert(cityid, cityname);
            }
            for (int i = 0; i < temp.Tables[0].Rows.Count; i++)
            {
                cityid   = Convert.ToInt32(temp.Tables[0].Rows[i]["SpecialityId"].ToString()) - 1;
                specName = temp.Tables[0].Rows[i]["SpecialityName"].ToString();
                SpecDDL.Items.Insert(cityid, specName);
            }
            //check the vacation for the doctors
            GetAllData.VacationsForDoctor();
        }
    }
Exemplo n.º 10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         UserService     us    = new UserService();
         DataSet         ds    = us.GetCity();
         List <ListItem> list  = GetAllData.getListItemsForDDL(ds, "City");
         int             index = 0;
         foreach (ListItem l in list)
         {
             if (index != 1)
             {
                 CityList.Items.Add(l);
             }
             index++;
         }
     }
 }
Exemplo n.º 11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         User u = (User)Session["user"];
         HelloLabel.Text = u.CUserName;
         DoctorService   docser = new DoctorService();
         DataSet         ds     = docser.GetSpecailty();
         List <ListItem> list   = GetAllData.getListItemsForDDL(ds, "Speciality");
         SpecailtyDropDownList.Items.Clear();
         foreach (ListItem l in list)
         {
             SpecailtyDropDownList.Items.Add(l);
         }
         SpecailtyDropDownList.DataBind();
         GetAllData.VacationsForDoctor();
     }
 }
Exemplo n.º 12
0
 protected void ShowMessageUserGrid_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e)
 {
     if (e.CommandName == "AnswerUser")
     {
         Label4.Visible             = true;
         AnswerTB.Visible           = true;
         ResetMessageAnswer.Visible = true;
         SendMessageAnswer.Visible  = true;
         UndoMessageAnswer.Visible  = true;
         Message m         = new Message();
         Manager man       = (Manager)Session["manager"];
         int     rowNumber = Convert.ToInt32(e.CommandArgument);
         int     MessageId = Convert.ToInt32(ShowMessageUserGrid.Rows[rowNumber].Cells[0].Text);
         m = GetAllData.GetAllDataFromMessageForAnswer(MessageId, "user");
         m.CMessageManagerId   = man.CManagerId;
         Session["newMessage"] = m;
         Session["adress"]     = "user";
     }
 }
Exemplo n.º 13
0
    protected void LoginSubmit_Click(object sender, EventArgs e)
    {
        UserService us1 = new UserService();
        DataSet     ds  = us1.Login(LoginIdTB.Text, LoginPasswordTB.Text);

        if (ds.Tables[0].Rows.Count == 1)
        {
            Label6.Text = "התחברת בהצלחה";
            UserService us = new UserService();
            us.UpdateLastLoginDate(LoginIdTB.Text, DateTime.Now);
            User u = GetAllData.GetAllUserDataById(LoginIdTB.Text);
            Session["user"] = u;
            Response.Redirect("http://localhost:49675/Personal.aspx");
        }
        else
        {
            DoctorService doc1 = new DoctorService();
            DataSet       ds1  = doc1.DoctorLogin(LoginIdTB.Text, LoginPasswordTB.Text);
            if (ds1.Tables[0].Rows.Count == 1)
            {
                Doctor d = GetAllData.GetAllDoctorDataById(LoginIdTB.Text);
                Session["doctor"] = d;
                Response.Redirect("http://localhost:49675/DoctorInfo.aspx");
                Label6.Text = "התחברת בהצלחה";
            }
            else
            {
                ManagerService ms  = new ManagerService();
                DataSet        ds2 = ms.ManagerLogin(LoginIdTB.Text, LoginPasswordTB.Text);
                if (ds2.Tables[0].Rows.Count == 1)
                {
                    Manager m = GetAllData.GetAllManagerDataById(LoginIdTB.Text);
                    Session["manager"] = m;
                    Response.Redirect("http://localhost:49675/ManagerHome.aspx");
                }
                else
                {
                    Label6.Text = "תעודת זהות או סיסמא אינם נכונים";
                }
            }
        }
    }
Exemplo n.º 14
0
    protected void WhoDDL_SelectedIndexChanged(object sender, EventArgs e)
    {
        DoctorIdL.Visible = false;
        DoctorNameDropDownList.Visible = false;
        DataSet         ds;
        List <ListItem> list = new List <ListItem>();
        int             x    = WhoDDL.SelectedIndex;

        if (x == 0)
        {
            WhoValid.Text = "לא בחרת";
            return;
        }
        else if (x == 1)
        {
            //doctor
            Session["adress"] = "doctor";
            DoctorService docser = new DoctorService();
            DoctorNameDropDownList.Items.Clear();
            ds   = docser.GetDoctorName("");
            list = GetAllData.getListItemsForDDL(ds, "Doctor");
        }
        else if (x == 2)
        {
            //manager
            Session["adress"] = "manager";
            ManagerService ms = new ManagerService();
            ds = ms.GetManager();
            DoctorNameDropDownList.Items.Clear();
            list = GetAllData.getListItemsForDDL(ds, "Manager");
        }
        //add the listitems to the dropdown list
        foreach (ListItem l in list)
        {
            DoctorNameDropDownList.Items.Add(l);
        }
        DoctorNameDropDownList.DataBind();
        DoctorNameDropDownList.Visible = true;
        DoctorIdL.Visible = true;
    }
Exemplo n.º 15
0
    protected void SpecailtyDropDownList_SelectedIndexChanged(object sender, EventArgs e)
    {
        /*
         * לעשות שאילתה שלפי הקטגוריה שנבחרה מציגה את הרופאים
         * לעשות feedback
         * לשמור בענן את הקטגוריה שנבחרה
         */

        //init

        int    docSpec = Convert.ToInt32(SpecailtyDropDownList.SelectedValue);
        string s       = " where DoctorIsOnVacation=false and DoctorSpecailty=" + docSpec;

        DoctorService docser = new DoctorService();
        DataSet       ds     = docser.GetDoctorName(s);

        if (ds.Tables[0].Rows.Count > 0)
        {
            DoctorDropDownList.Visible = true;
            Label4.Visible             = true;
            List <ListItem> list = GetAllData.getListItemsForDDL(ds, "Doctor");
            DoctorDropDownList.Items.Clear();
            foreach (ListItem l in list)
            {
                DoctorDropDownList.Items.Add(l);
            }
            DoctorDropDownList.DataBind();
            Session["Spec"] = docSpec;
        }
        else
        {
            SpecalityValid.Visible = true;
            AppHour.Visible        = false;
            SubmitButton.Visible   = false;
            ResetButton.Visible    = false;
            DateTB.Visible         = false;
            Label6.Visible         = false;
            Response.Write("<script>alert('אין רופאים תחת התמחות זו')</script>");
        }
    }
Exemplo n.º 16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Manager m = (Manager)Session["manager"];
         HelloLabel.Text = m.CManagerName;
         GetAllData.VacationsForDoctor();
         VacationService vs         = new VacationService();
         string          whereclout = " WHERE DoctorId=VacationDoctorId and ManagerId=VacationManagerId";
         DataSet         ds         = vs.SortVacation(whereclout);
         ShowVac.Visible = false;
         if (ds.Tables[0].Rows.Count != 0)
         {
             CloseVac.Visible   = true;
             ShowVac.Visible    = true;
             ShowVac.DataSource = ds;
             ShowVac.DataBind();
         }
         else
         {
             Response.Write("<script>alert('לא נמצאו חופשות')</script>");
         }
     }
 }
Exemplo n.º 17
0
 protected void ShowDataGridForDoctor_RowUpdating(object sender, System.Web.UI.WebControls.GridViewUpdateEventArgs e)
 {
     try
     {
         Vacation v = new Vacation();
         //validation
         DateTime start = Convert.ToDateTime(((TextBox)(ShowDataGridForDoctor.Rows[e.RowIndex].Cells[9].FindControl("StartVac"))).Text);
         DateTime end   = Convert.ToDateTime(((TextBox)(ShowDataGridForDoctor.Rows[e.RowIndex].Cells[9].FindControl("EndVac"))).Text);
         if (start == null || end == null)
         {
             Response.Write("<script>alert('בחירת תאריך לא תקינה')</script>");
             return;
         }
         if (start < DateTime.Now || end < DateTime.Now || end < start)
         {
             Response.Write("<script>alert('בחירת תאריך לא תקינה')</script>");
             return;
         }
         v.CVacationStartDate = start;
         v.CVacationEndDate   = end;
         Manager m = (Manager)Session["manager"];
         v.CVacationManagerId = m.CManagerId;
         v.CVacationDoctorId  = ShowDataGridForDoctor.Rows[e.RowIndex].Cells[0].Text;
         VacationService vs = new VacationService();
         vs.InsertVacation(v);
         GetAllData.VacationsForDoctor();
         Response.Write("<script>alert('חופשה התקבלה')</script>");
         ShowDataGridForDoctor.EditIndex = -1;
         ShowGrid_Click(sender, e);
     }
     catch
     {
         Response.Write("<script>alert('בחירת תאריך לא תקינה')</script>");
         return;
     }
 }
Exemplo n.º 18
0
    protected void SubmitEdit_Click(object sender, EventArgs e)
    {
        NewSpecValid.Text     = "";
        NewCityValid.Text     = "";
        NewUniValid.Text      = "";
        NewPhoneValid.Text    = "";
        NewLiceValid.Text     = "";
        NewPasswordValid.Text = "";
        int spec = SpecDDL.SelectedIndex, city = DropDownList1.SelectedIndex;

        if (!Validation.IsPasswordValid(NewPassword.Text))
        {
            NewPasswordValid.Text = "סיסמא לא עונה על הדרישות";
        }
        if (!Validation.IsPhoneValid(NewPhone.Text))
        {
            NewPhoneValid.Text = "מספר טלפון לא תקין";
        }
        //temp
        if (DropDownList1.SelectedIndex == 0)
        {
            NewCityValid.Text = "עיר לא תקינה";
        }
        if (SpecDDL.SelectedIndex == 0)
        {
            NewSpecValid.Text = "התמחות לא תקינה";
        }
        if (!Validation.IsHouseNumberValid(NewLice.Text))
        {
            NewLiceValid.Text = "מספר שנים במקצוע לא תקין";
        }
        if (!Validation.IsNameValid(NewUni.Text))
        {
            NewUniValid.Text = "אוניברסיטה לא תקינה";
        }
        if (NewUniValid.Text == "" && NewLiceValid.Text == "" && NewSpecValid.Text == "" && NewCityValid.Text == "" && NewPhoneValid.Text == "" && NewPasswordValid.Text == "")
        {
            //update all the data
            string s = "DoctorCity=" + (DropDownList1.SelectedIndex + 1) + ",DoctorSpecailty=" + (SpecDDL.SelectedIndex + 1) + ",DoctorLicense=" + Convert.ToInt32(NewLice.Text) + ",DoctorUniversity='" + NewUni.Text + "',DoctorPhone='" + NewPhone.Text + "',DoctorPassword='******'";
            s = s + " WHERE DoctorId ='" + ShowId.Text + "'";
            DoctorService docser = new DoctorService();
            docser.UpdateDoctorInfo(s);
            NewLice.Visible       = false;
            NewUni.Visible        = false;
            SpecDDL.Visible       = false;
            NewPhone.Visible      = false;
            NewPassword.Visible   = false;
            DropDownList1.Visible = false;
            NewLiceValid.Text     = "";
            NewCityValid.Text     = "";
            NewUniValid.Text      = "";
            NewPhoneValid.Text    = "";
            NewSpecValid.Text     = "";
            NewPasswordValid.Text = "";
            SubmitEdit.Visible    = false;
            Doctor d = GetAllData.GetAllDoctorDataById(ShowId.Text);
            Session["doctor"] = d;
            NewLice.Text      = "";
            NewUni.Text       = "";
            NewPassword.Text  = "";
            NewPhone.Text     = "";
            Page_Load(sender, e);
            EditInfo.Text = "ערוך";
            System.Threading.Thread.Sleep(1000);
        }
    }
Exemplo n.º 19
0
    protected void SubmitEdit_Click(object sender, EventArgs e)
    {
        NewAdressValid.Text   = "";
        NewCityValid.Text     = "";
        NewEmailValid.Text    = "";
        NewPhoneValid.Text    = "";
        NewEmailValid.Text    = "";
        NewPasswordValid.Text = "";
        int x = DropDownList1.SelectedIndex;

        if (!(x >= 0 && x < 8))
        {
            NewCityValid.Text = "עיר לא תקינה";
        }
        //add update for city when you send the index and ID of user
        if (!Validation.IsAdressValid(NewAdress.Text))
        {
            NewAdressValid.Text = "כתובת לא תקינה";
        }
        if (!Validation.IsHouseNumberValid(NewHouseNumber.Text))
        {
            NewHouseNumberValid.Text = "מספר בית לא תקין";
        }
        if (!Validation.IsPhoneValid(NewPhone.Text))
        {
            NewPhoneValid.Text = "מספר טלפון לא תקין";
        }
        if (!Validation.IsEMailValid(NewEmail.Text))
        {
            NewEmailValid.Text = "אימייל לא תקין";
        }
        if (!Validation.IsPasswordValid(NewPassword.Text))
        {
            NewPasswordValid.Text = "סיסמא לא עונה על הדרישות";
        }
        //temp
        if (DropDownList1.SelectedIndex == 0)
        {
            NewCityValid.Text = "עיר לא תקינה";
        }
        if (NewCityValid.Text == "" && NewAdressValid.Text == "" && NewCityValid.Text == "" && NewEmailValid.Text == "" && NewPhoneValid.Text == "" && NewEmailValid.Text == "" && NewPasswordValid.Text == "")
        {
            UserService us1 = new UserService();
            us1.UpdateUserCity(ShowId.Text, x + 1);//לבדוק האם צריך להוסיף + 1
            us1.UpdateUserAdress(ShowId.Text, NewAdress.Text);
            us1.UpdateUserHouseNumber(ShowId.Text, Convert.ToInt32(NewHouseNumber.Text));
            us1.UpdateUserPhone(ShowId.Text, NewPhone.Text);
            us1.UpdateUserEmail(ShowId.Text, NewEmail.Text);
            us1.UpdateUserPassword(ShowId.Text, NewPassword.Text);
            NewAdress.Visible      = false;
            NewHouseNumber.Visible = false;
            NewEmail.Visible       = false;
            NewPhone.Visible       = false;
            NewPassword.Visible    = false;
            DropDownList1.Visible  = false;
            NewAdressValid.Text    = "";
            NewCityValid.Text      = "";
            NewEmailValid.Text     = "";
            NewPhoneValid.Text     = "";
            NewEmailValid.Text     = "";
            NewPasswordValid.Text  = "";
            SubmitEdit.Visible     = false;
            User u = GetAllData.GetAllUserDataById(ShowId.Text);
            Session["user"]     = u;
            NewAdress.Text      = "";
            NewHouseNumber.Text = "";
            NewPassword.Text    = "";
            NewPhone.Text       = "";
            NewEmail.Text       = "";
            Page_Load(sender, e);
            EditInfo.Text = "ערוך";
            System.Threading.Thread.Sleep(1000);
        }
    }
 /// <summary>
 ///     Creates a new role based data fetcher.
 /// </summary>
 /// <typeparam name="TData">The type of fetched data.</typeparam>
 /// <param name="getAll">A function used to fetch all data.</param>
 /// <param name="getManaged">A function used to fetch data managed by the specified manager.</param>
 /// <returns></returns>
 public static RoleBasedDataFetcher <TData> Create <TData>(GetAllData <TData> getAll, GetManagedData <TData> getManaged)
 {
     Contract.Requires(getAll != null);
     Contract.Requires(getManaged != null);
     return(new RoleBasedDataFetcher <TData>(getAll, getManaged));
 }