コード例 #1
0
        private void lnkHome_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Hide();
            UserPortal up = new UserPortal();

            up.Show();
        }
コード例 #2
0
        private void cmdLogin_Click(object sender, EventArgs e)
        {
            bool is_valid;
            bool validate;

            server.Service1 server = new server.Service1();
            server.Login(txtUsername.Text, txtPassword.Text, out is_valid, out validate);
            if (is_valid == true)
            {
                this.Hide();
                UserPortal up = new UserPortal();
                up.Show();
            }
            else
            {
                MessageBox.Show("Invalid username and password.");
            }
        }
コード例 #3
0
ファイル: UploadBlog.cs プロジェクト: HafsaMkhan/Niche-Blog
        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.");
            }
        }