Beispiel #1
0
        private void cmdUpload_Click(object sender, EventArgs e)
        {
            bool vall, value;

            server.Service1 serv = new server.Service1();
            serv.UploadBlog(txtTitle.Text, txtGenre.Text, txtDetail.Text, MyUtility.loginUserName, out vall, out value);
            if (vall == true & value == true)
            {
                MessageBox.Show("Blog uploaded successfully!");
                this.Hide();
                UserPortal up = new UserPortal();
                up.Show();
            }
            else
            {
                MessageBox.Show("Retry! Connection problem.");
            }
        }
Beispiel #2
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            bool found, isfound;

            server.Service1 server = new server.Service1();
            server.UploadBlog(txtTitle.Text, txtType.Text, txtDetails.Text, "admin@123", out found, out isfound);
            if (txtTitle.Text == "" || txtType.Text == "" || txtDetails.Text == "")
            {
                MessageBox.Show("Invalid information!");
            }
            if (found == true & isfound == true)
            {
                txtDetails.Text = "";
                txtType.Text    = "";
                txtTitle.Text   = "";
                MessageBox.Show("Blog has been uploaded successfully!");
            }
            else
            {
                txtTitle.Text = "";
                MessageBox.Show("Sorry! Blog hasn't uploaded.");
            }
        }