Esempio n. 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Users udc = new Users();

            if (txtUsername.Text == "" || txtPassword.Text == "")
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts", "<script>alert('fill all fields and try again');</script>");
            }

            else
            {
                udc.Username = txtUsername.Text;
                udc.Password = txtPassword.Text;

                Service5Client service = new Service5Client();
                if (service.Login(udc) == 1)
                {
                    if (txtUsername.Text == "uniadmin")
                    {
                        Response.Redirect("StuPanel.aspx");
                    }
                    else
                    {
                        Response.Redirect("index.aspx");
                    }
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts", "<script>alert('Please Check Your Username and Password !!');</script>");
                }
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Service5Client s = new Service5Client();

            GridView1.DataSource = s.GetComTimetables();
            GridView1.DataBind();

            Service5Client r = new Service5Client();

            GridView2.DataSource = r.GetBusTimetables();
            GridView2.DataBind();

            Service5Client t = new Service5Client();

            GridView3.DataSource = t.GetEngTimetables();
            GridView3.DataBind();
        }
Esempio n. 3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Feedbacksc fbdc = new Feedbacksc();

            fbdc.Username = TextBox1.Text;
            fbdc.Faculty  = DropDownList1.Text;
            fbdc.Modcode  = DropDownList2.Text;
            fbdc.Feedback = TextBox2.Text;

            Service5Client service = new Service5Client();

            if (service.AddFeedback(fbdc) == 1)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts", "<script>alert('Successfully Saved');</script>");
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts", "<script>alert('Error.. Please Try Again');</script>");
            }
        }