Example #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     localhost.Service1 myService = new localhost.Service1();
     myService.Credentials = System.Net.CredentialCache.DefaultCredentials;
     textBox1.Text         = myService.GetInformation();
     myService.Dispose();
 }
Example #2
0
        private void linklblLogin_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            bool login;
            bool loginpassed;

            myserver.logina(txtCNIC.Text, txtConfirmPassword.Text, out login, out loginpassed);
            if (login)
            {
                Login l = new Login();
                this.Hide();
                l.Show();
            }
            myserver.loginp(txtCNIC.Text, txtConfirmPassword.Text, out login, out loginpassed);
            if (login)
            {
                Login l = new Login();
                this.Hide();
                l.Show();
            }

            else
            {
                LoginD k = new LoginD();
                this.Hide();
                k.Show();
            }
        }
Example #3
0
        private void Test_Load(object sender, EventArgs e)
        {
            localhost.Service1 s = new localhost.Service1();

            // s.test(out i, out c);
            //textBox1.Text = i.ToString();
        }
Example #4
0
        private void btnPlaceOrder_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtUsername.Text))
            {
                MessageBox.Show("Enetr Name");
            }
            if (string.IsNullOrEmpty(txtCNIC.Text))
            {
                MessageBox.Show("Enter your CNIC");
            }

            if (string.IsNullOrEmpty(txtAddress.Text))
            {
                MessageBox.Show("Enter postal address");
            }
            if (!chkYes.Checked)
            {
                MessageBox.Show("Approve your status");
            }
            else
            {
                localhost.Order order = new localhost.Order();
                order.Name   = txtUsername.Text;
                order.Adress = txtAddress.Text;
                order.Shoe   = MyUtils.curr_shoe;
                localhost.Service1 ns = new localhost.Service1();
                ns.PlaceOrder(order);

                MessageBox.Show("Your order has been placed");
            }
        }
Example #5
0
        private void cmdLogin_Click(object sender, EventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            bool login;
            bool loginpassed;

            //bool loginp;
            //bool loginppassed;
            myserver.logina(txtCNIC.Text, txtPassword.Text, out login, out loginpassed);
            if (login)
            {
                {
                    MessageBox.Show("valid user");
                }
            }
            else
            {
                myserver.loginp(txtCNIC.Text, txtPassword.Text, out login, out loginpassed);
                if (login)
                {
                    MessageBox.Show("valid user");
                }
                else
                {
                    MessageBox.Show("invalid user");
                }
            }
        }
        private void cmdRegister_Click(object sender, EventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            //bool register;
            //bool registerpassed;
            if (radioButtonAdmin.Checked == true)
            {
                //MessageBox.Show("u r registered");
                //myserver.registera(txtName.Text , txtCNIC.Text , txtPassword.Text);
                myserver.registera(txtName.Text, txtCNIC.Text, txtPassword.Text);
                MessageBox.Show("u r registered");
            }

            else if (radioButtonPatient.Checked == true)
            {
                // MessageBox.Show("u r registered");
                myserver.registerp(txtName.Text, txtCNIC.Text, txtPassword.Text);
                SetValueForText1 = txtName.Text;
                SetValueForText2 = txtCNIC.Text;

                MessageBox.Show("u r registered");
            }

            else if (radioButtonDoctor.Checked == true)
            {
                //MessageBox.Show("u r registered");
                myserver.registerd(txtName.Text, txtCNIC.Text, txtPassword.Text, txtHospitalName.Text);

                MessageBox.Show("u r registered");
            }
            else
            {
                MessageBox.Show("choose atleast 1 option");
            }
        }
Example #7
0
        private void btnAddComplaint_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(txtName.Text) || string.IsNullOrWhiteSpace(txtMobileNo.Text) ||
                string.IsNullOrWhiteSpace(txtComplaint.Text))
            {
                MessageBox.Show("Fill all necessary information");
            }
            else
            {
                localhost.Complaint complaint = new localhost.Complaint();
                complaint.Name           = txtName.Text;
                complaint.Cell           = txtMobileNo.Text;
                complaint.Email          = txtEmail.Text;
                complaint.Complaint_Text = txtComplaint.Text;

                localhost.Service1 s = new localhost.Service1();
                s.AddComplaint(complaint);


                MessageBox.Show("Your complaint has been sent");

                txtName.Text      = null;
                txtMobileNo.Text  = null;
                txtEmail.Text     = null;
                txtComplaint.Text = null;
            }
        }
Example #8
0
        private void UserComplaints_Load(object sender, EventArgs e)
        {
            localhost.Service1 s  = new localhost.Service1();
            BindingSource      bs = new BindingSource();

            bs.DataSource = s.GetAllComplaints();
            gvAllComplaints.DataSource = bs;
        }
        public void LoadPrecustomizedDetails()
        {
            localhost.Service1 s = new localhost.Service1();
            BindingSource      b = new BindingSource();

            b.DataSource = s.SeeMoreDesigns();
            gvMorePrecustomized.DataSource = b;
        }
Example #10
0
        private void cmdshow_Click(object sender, EventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            BindingSource      bs       = new BindingSource();

            bs.DataSource  = myserver.getp(lblCNIC.Text);
            gv5.DataSource = bs;
        }
Example #11
0
        private void cmdShow_Click(object sender, EventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            BindingSource      bs       = new BindingSource();

            bs.DataSource  = myserver.show6(txtName.Text, comboBoxDepartment.Text);
            gv3.DataSource = bs;
        }
Example #12
0
        public void LoadApprovedOrders()
        {
            gvApprovedOrders.DataSource = null;
            localhost.Service1 s  = new localhost.Service1();
            BindingSource      bs = new BindingSource();

            bs.DataSource = s.GetApprovedOrders();
            gvApprovedOrders.DataSource = bs;
        }
        private void cmdSave_Click(object sender, EventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            BindingSource      bs       = new BindingSource();

            //BindingSource b = new BindingSource();
            bs.DataSource = myserver.addmed(label2.Text, txtmedicines.Text, txtage.Text, txtdisease.Text);

            gv6.DataSource = bs;
        }
Example #14
0
        private void btnApproveAll_Click(object sender, EventArgs e)
        {
            localhost.Service1 s = new localhost.Service1();
            s.ApproveAllOrders();
            ApprovedOrders a = ApprovedOrders.GetInstance();

            a.Show();
            this.Hide();
            dgOrders.DataSource = null;
        }
Example #15
0
        private void cmdShow_Click(object sender, EventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            BindingSource      bs       = new BindingSource();

            bs.DataSource          = myserver.show();
            gv1.DataSource         = bs;
            gv1.Columns[3].Visible = false;
            // gv1.Columns[2].Visible = false;
            gv1.Columns[4].Visible = false;
        }
Example #16
0
        private void cmdShow_Click(object sender, EventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            BindingSource      bs       = new BindingSource();

            bs.DataSource         = myserver.searchA(txtCNIC.Text);
            gv.DataSource         = bs;
            gv.Columns[0].Visible = false;
            gv.Columns[1].Visible = false;
            gv.Columns[2].Visible = false;
            gv.Columns[6].Visible = false;
        }
Example #17
0
        private void dgOrders_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            localhost.Service1 s = new localhost.Service1();
            bool x = true;
            //if (e.ColumnIndex == 9)
            //{

            BindingSource bnd = new BindingSource();

            bnd.DataSource             = s.GetShoefromOrders(e.RowIndex, x);
            gvSelectedOrder.DataSource = bnd;                //}
        }
        public void showPosts()
        {
            //  gvPosts.AutoGenerateColumns = false;

            localhost.Service1 myserver = new localhost.Service1();
            BindingSource      bs       = new BindingSource();

            bs.DataSource  = myserver.getp(label2.Text);
            gv6.DataSource = bs;

            //gv6.Columns[2].Visible = false;
        }
Example #19
0
        private void linklblDoctorinfo_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            bool login;
            bool loginpassed;

            myserver.logina(txtCNIC.Text, txtPassword.Text, out login, out loginpassed);
            if (login)
            {
                Doctor_Info DoctorInfo = new Doctor_Info();
                this.Hide();
                DoctorInfo.Show();
            }
        }
Example #20
0
        private void btnSendOrderToAdmin_Click(object sender, EventArgs e)
        {
            if (MainColor == "No Color" || SideColor == "No Color")
            {
                MessageBox.Show("Select Both Colors");
            }
            else
            {
                localhost.Shoe sh = new localhost.Shoe();
                sh.MainColor = MainColor;
                sh.SideColor = SideColor;
                sh.Laces     = Laces;
                localhost.Service1 service1 = new localhost.Service1();
                service1.MoreDesigns(sh);

                MessageBox.Show("Design has been sent to Admin");
            }
        }
Example #21
0
        private void linklblHistory_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            bool login;
            bool loginpassed;

            myserver.loginp(txtCNIC.Text, txtPassword.Text, out login, out loginpassed);
            if (login)
            {
                History DoctorInfo = new History();
                this.Hide();
                DoctorInfo.Show();


                //gv.Columns[0].Visible = false;
                // gv.Columns[1].Visible = false;
                // gv.Columns[6].Visible = false;
            }
        }
        private void linklblShowHistory_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            BindingSource      bs       = new BindingSource();

            //BindingSource b = new BindingSource();
            bs.DataSource = myserver.searchhistory();

            gv6.DataSource = bs;



            //gv6.Columns[0].Visible = false;
            //gv6.Columns[1].Visible = false;
            //gv6.Columns[4].Visible = false;
            //gv6.Columns[2].Visible = false;
            //gv6.Columns[3].Visible = false;
            // gv6.Columns[].Visible = false;
        }
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();

            //localhost.PatientUser p = new localhost.PatientUser();
            //p.Age = txtage.Text;
            //p.Medicines1 = txtmedicines.Text;
            //p.Disease1 = txtdisease.Text;
            //p.PatientCNIC = Patient.SetValueForText1;
            // myserver.addinto(p,label2.Text);
            //BindingSource bs = new BindingSource();
            //BindingSource b = new BindingSource();
            myserver.addinto(txtage.Text, txtmedicines.Text, txtdisease.Text, label2.Text);
            MessageBox.Show("saved");

            //gv6.DataSource = bs;


            //showPosts();
        }
Example #24
0
        public void LoadOrders()
        {
            dgOrders.DataSource = null;
            localhost.Service1 s = new localhost.Service1();
            BindingSource      b = new BindingSource();

            b.DataSource        = s.GetOrdersList();
            dgOrders.DataSource = b;

            dgOrders.Columns[2].Visible = false;
            dgOrders.Columns[6].Visible = false;
            dgOrders.Columns[4].Visible = false;


            DataGridViewButtonColumn btn = new DataGridViewButtonColumn();

            dgOrders.Columns.Add(btn);
            btn.HeaderText = "Show Shoe";
            btn.Text       = "Shoe Details";
            btn.UseColumnTextForButtonValue = true;
        }
Example #25
0
        private void cmdConfirmPassword_Click(object sender, EventArgs e)
        {
            localhost.Service1 myserver = new localhost.Service1();
            bool reset;
            bool resetpassed;

            //bool reseta;
            //bool resetapassed;
            //bool resetd;
            //bool resetdpassed;
            myserver.reset(txtName.Text, txtCNIC.Text, txtPassword.Text, txtConfirmPassword.Text, out reset, out resetpassed);
            myserver.reseta(txtName.Text, txtCNIC.Text, txtPassword.Text, txtConfirmPassword.Text, out reset, out resetpassed);
            myserver.resetd(txtName.Text, txtCNIC.Text, txtPassword.Text, txtConfirmPassword.Text, out reset, out resetpassed);
            if (reset)
            {
                MessageBox.Show("password has been reset");
            }
            else
            {
                MessageBox.Show("password doesnot match");
            }
        }
Example #26
0
 private void cmdSave_Click(object sender, EventArgs e)
 {
     localhost.Service1 myserver = new localhost.Service1();
     myserver.timings(txtName.Text, txtCNIC.Text, txtHospitalName.Text, comboBoxDepartment.Text, comboBoxDay.Text, txtTime.Text, txtDate.Text);
     MessageBox.Show("Timings are saved");
 }