예제 #1
0
        private void updatespdetailsbutton_Click(object sender, EventArgs e)
        {
            DashboardforSP dashboardforSP = new DashboardforSP(spUsername);

            this.Hide();



            DialogResult d;

            d = MessageBox.Show("Do you want to Go Back?", "", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);

            if (d == DialogResult.Yes)
            {
                dashboardforSP.Show();
            }
            else if (d == DialogResult.No)
            {
                this.Show();
            }
            else
            {
                Close();
            }
        }
        private void buttonBack_Click(object sender, EventArgs e)
        {
            DashboardforSP dsp = new DashboardforSP(spUserName);

            this.Hide();
            dsp.Show();
        }
        private void Registerformbutton_Click(object sender, EventArgs e)
        {
            double            serviceCharge     = Convert.ToDouble(NameregistertextBox.Text);
            string            availableTime     = fromtimetextBox.Text + " " + fromtimecomboBox.Text + "-" + totimetextBox.Text + " " + totimecomboBox.Text;
            GeneralOperations generalOperations = new GeneralOperations();

            int result = generalOperations.AddServiceProviderDetails(spUserName, serviceCharge, availableTime);

            if (result > 0)
            {
                MessageBox.Show("Details Added successfully !!");
                DashboardforSP dashboardforSP = new DashboardforSP(spUserName);
                this.Hide();
                dashboardforSP.Show();
                //UpdateListOfProducts();
            }
            else
            {
                MessageBox.Show("Error in adding.");
            }
        }