Beispiel #1
0
        private void loginButton_Click(object sender, EventArgs e)
        {
            MainServiceReference.MainServiceSoapClient client = new MainServiceReference.MainServiceSoapClient("MainServiceSoap");

            int type = client.Login(usernameBox.Text, passwordBox.Text);

            if (type == 1)
            {
                //creates the second form and displays it
                Menu f = new Menu();
                Hide();
                f.ShowDialog();
            }
            else if (type == 2)
            {
                UpdateExpn f = new UpdateExpn();
                Hide();
                f.ShowDialog();
            }
            else if (type == 3)
            {
                AuthExpn f = new AuthExpn();
                Hide();
                f.ShowDialog();
            }
            else
            {
                MessageBox.Show("Username or Password Is Not Correct ...Please Try Again!");
            }
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            MainServiceReference.MainServiceSoapClient client = new MainServiceReference.MainServiceSoapClient("MainServiceSoap");
            DataSet d = client.GetReports(ssn_box.Text, 1);

            d.Tables[0].Columns["first_name"].ColumnName = "Manager's First Name";
            d.Tables[0].Columns["last_name"].ColumnName  = "Manager's Last Name";
            dataGridView1.DataSource = d.Tables[0];
        }
Beispiel #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            MainServiceReference.MainServiceSoapClient client = new MainServiceReference.MainServiceSoapClient("MainServiceSoap");
            int report_id = Int32.Parse(textBox1.Text);

            client.Update(report_id);
            MessageBox.Show("You have approved the expense report!");
            dataGridView1.DataSource = client.GetReports(ssn_box.Text, 2).Tables[0];
        }
Beispiel #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            MainServiceReference.MainServiceSoapClient client = new MainServiceReference.MainServiceSoapClient("MainServiceSoap");
            int     manager_id = Int32.Parse(textBox2.Text);
            decimal price      = Decimal.Parse(textBox5.Text);

            client.Insert(textBox1.Text, manager_id, textBox3.Text, textBox4.Text, dateTimePicker1.Text, price);
            MessageBox.Show("Expense Report Added!");
            Menu f = new Menu();

            Hide();
            f.ShowDialog();
        }