예제 #1
0
        public string getUserName()
        {
            KCCWebService web      = new KCCWebService();
            DataTable     dt       = web.userShow(Session["userEmail"].ToString());
            string        userName = dt.Rows[0][0].ToString() + " " + dt.Rows[0][1].ToString();

            return(userName);
        }
        public void getUserDetails()
        {
            KCCWebService web = new KCCWebService();
            DataTable     dt  = web.userShow(Session["userEmail"].ToString());

            userinfo.DataSource = dt;
            userinfo.DataBind();
        }
        private void BindListView()
        {
            KCCWebService web = new KCCWebService();

            noticeListView.DataSource = web.noticeShowDetails();
            noticeListView.DataBind();
            latestArticle.DataSource = web.articleShow();
            latestArticle.DataBind();
        }
예제 #4
0
        public void getUserDetails()
        {
            KCCWebService web = new KCCWebService();
            DataTable     dt  = web.userShow(Session["userEmail"].ToString());

            userFirstName.Text = dt.Rows[0]["firstName"].ToString();
            userLastName.Text  = dt.Rows[0]["lastName"].ToString();
            userEmail.Text     = dt.Rows[0]["email"].ToString();
            userAddress.Text   = dt.Rows[0]["address"].ToString();
        }
        private void BindListView()
        {
            KCCWebService web = new KCCWebService();

            noticeListView.DataSource = web.noticeShow();
            noticeListView.DataBind();
            latestArticle.DataSource = web.articleShow();
            latestArticle.DataBind();
            clubAbout.DataSource = getInfo();
            clubAbout.DataBind();
        }
        private void BindListView()
        {
            KCCWebService web = new KCCWebService();

            noticeListView.DataSource = noticeShow();
            noticeListView.DataBind();
            latestArticle.DataSource = articleShow();
            latestArticle.DataBind();
            clubCommittee.DataSource = getInfo();
            clubCommittee.DataBind();
        }
        private void BindListView()
        {
            KCCWebService web = new KCCWebService();

            noticeListView.DataSource = web.noticeShow();
            noticeListView.DataBind();
            // showPost.DataSource = web.showArticle(Session["articleId"].ToString());
            showPost.DataSource = web.showArticle(Request.QueryString["articleId"]);
            showPost.DataBind();
            // Session.Remove("articleId");
            // Response.Cookies["articleId"].Expires = DateTime.Now.AddDays(-1);
            latestArticle.DataSource = web.articleShow();
            latestArticle.DataBind();
        }
예제 #8
0
        protected void userPasswordChange_Click(object sender, EventArgs e)
        {
            int           n;
            KCCWebService web = new KCCWebService();

            n = web.userPasswordChange(userCurrentPassword.Text, userNewPassword.Text, Session["userEmail"].ToString());
            if (n != 0)
            {
                labelSucceed.Text = "Successfully Updated !!";
            }
            else
            {
                LabelFailed.Text = "Failed !!!";
            }
        }
        protected void noticePostButton_Click(object sender, EventArgs e)
        {
            int           n;
            KCCWebService web = new KCCWebService();

            n = web.noticePost(noticeTitle.Text, noticeDetails.Text);
            if (n != 0)
            {
                labelSucceed.Text = "Notice Posted !!";
            }
            else
            {
                LabelFailed.Text = "Failed !!!";
            }
        }
예제 #10
0
        protected void userProfileUpdate_Click(object sender, EventArgs e)
        {
            int           n;
            KCCWebService web = new KCCWebService();

            n = web.userProfileUpdate(userFirstName.Text, userLastName.Text, Session["userEmail"].ToString(), userAddress.Text);
            if (n != 0)
            {
                labelSucceed.Text = "Successfully Updated !!";
            }
            else
            {
                LabelFailed.Text = "Failed !!!";
            }
        }
예제 #11
0
        protected void loginButton_Click(object sender, EventArgs e)
        {
            KCCWebService web = new KCCWebService();
            DataSet       ds  = web.loginUser(loginEmail.Text, loginPassword.Text);

            if (ds.Tables[0].Rows.Count > 0)
            {
                Session["userEmail"] = loginEmail.Text;
                Response.Redirect("userDashboard.aspx");
            }
            else
            {
                loginLabel.Text = "Invalid email or password !!";
            }
        }
예제 #12
0
        public static string UserNameChecker(string uEmail)
        {
            string        retreval = "";
            KCCWebService web      = new KCCWebService();
            DataTable     dt       = web.userShow(uEmail);

            if (dt.Rows.Count > 0)
            {
                retreval = "true";
            }
            else
            {
                retreval = "false";
            }
            return(retreval);
        }
예제 #13
0
        protected void register_Click(object sender, EventArgs e)
        {
            int           n;
            KCCWebService web = new KCCWebService();

            n = web.userRegister(firstName.Text, lastName.Text, email.Text, password.Text, address.Text);
            if (n != 0)
            {
                labelSucceed.Text = "Registration Completed !!";
                Response.Redirect("login.aspx");
            }
            else
            {
                LabelFailed.Text = "Registration Failed";
            }
        }
예제 #14
0
        protected void articlePostButton_Click(object sender, EventArgs e)
        {
            int    n;
            string author  = getUserName();
            string article = articleDetails.Text;
            // article = Server.HtmlEncode(article);
            //  article = article.Replace(" ", " ");
            // article = article.Replace("\r\n", "<br/>");
            KCCWebService web = new KCCWebService();

            n = web.articlePost(articleTitle.Text, article, author, Session["userEmail"].ToString());
            if (n != 0)
            {
                labelSucceed.Text = "Article Posted !!";
            }
            else
            {
                LabelFailed.Text = "Failed !!!";
            }
        }