예제 #1
0
        public static string insertChat(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();

            _sbobj.Message = _arr[0].ToString();
            _sbobj.EID = _arr[1].ToString();

            return _sbobj.InsertChat();
        }
예제 #2
0
        public static string addQuestionaire(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();

            _sbobj.Question = _arr[0].ToString();
            _sbobj.Answer = _arr[1].ToString();
            _sbobj.Difficulty = _arr[2].ToString();
            return _sbobj.AddQuestionaire();
        }
예제 #3
0
        public static string addAdmin(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();

            _sbobj.EID = _arr[0].ToString();
            _sbobj.Capability = _arr[1].ToString();
            _sbobj.Project = _arr[2].ToString();
            return _sbobj.AddAdmin();
        }
예제 #4
0
        public static string addActivity(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();

            _sbobj.Title = _arr[0].ToString();
            _sbobj.Description = _arr[1].ToString();
            _sbobj.Date = Convert.ToDateTime(_arr[2].ToString());
            return _sbobj.AddActivity();
        }
예제 #5
0
        public static string updateAdmin(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();

            _sbobj.UserNo = Convert.ToInt32(_arr[0].ToString());
            _sbobj.EID = _arr[1].ToString();
            _sbobj.Capability = _arr[2].ToString();
            _sbobj.Project = _arr[3].ToString();
            _sbobj.Type = _arr[4].ToString();
            return _sbobj.UpdateAdmin();
        }
예제 #6
0
        public static string deleteQuestionaire(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();

            _sbobj.QuestionID = Convert.ToInt32(_arr[0].ToString());
            _sbobj.Question = _arr[1].ToString();
            _sbobj.Answer = _arr[2].ToString();
            _sbobj.Difficulty = _arr[3].ToString();

            return _sbobj.DeleteQuestionaire();
        }
예제 #7
0
        public static string getActiveQuestion(Int32 questid)
        {
            SBObj _sbobj = new SBObj();
            _sbobj.QuestionID = questid;
            DataSet ds = new DataSet();
            try
            {
                ds.Tables.Add(_sbobj.GetActiveQuestion());
            }
            catch (Exception ex)
            {

            }
            return ds.GetXml();
        }
예제 #8
0
        public static string loadTop1(Int32 userno)
        {
            SBObj _sbobj = new SBObj();
            _sbobj.UserNo = userno;
            DataSet ds = new DataSet();
            try
            {
                ds.Tables.Add(_sbobj.LoadTop1());
            }
            catch (Exception ex)
            {

            }
            return ds.GetXml();
        }
예제 #9
0
        public static string displayQuestionairesModal(Int32 questid)
        {
            SBObj _sbobj = new SBObj();
            _sbobj.QuestionID = questid;
            DataSet ds = new DataSet();
            try
            {
                ds.Tables.Add(_sbobj.DisplayQuestionairesModal());
            }
            catch (Exception ex)
            {

            }
            return ds.GetXml();
        }
예제 #10
0
        public static string alertCorrectAnswer(Int32 questid)
        {
            SBObj _sbobj = new SBObj();
            _sbobj.QuestionID = questid;
            DataSet ds = new DataSet();
            try
            {
                ds.Tables.Add(_sbobj.AlertCorrectAnswer());
            }
            catch (Exception ex)
            {

            }
            return ds.GetXml();
        }
예제 #11
0
        public static string displayMakeAdmin(Int32 questid)
        {
            SBObj _sbobj = new SBObj();
            _sbobj.UserNo = questid;
            DataSet ds = new DataSet();
            try
            {
                ds.Tables.Add(_sbobj.DisplayMakeAdmin());
            }
            catch (Exception ex)
            {

            }
            return ds.GetXml();
        }
예제 #12
0
        public static string checkifnotAnswered(Int32 questid)
        {
            SBObj _sbobj = new SBObj();
            _sbobj.QuestionID = questid;
            DataSet ds = new DataSet();
            try
            {
                ds.Tables.Add(_sbobj.CheckifnotAnswered());
            }
            catch (Exception ex)
            {

            }
            return ds.GetXml();
        }
예제 #13
0
        public static string displayUsers(List<string> _arr)
        {
            DataTable dummy = new DataTable();

            SBObj _sbobj = new SBObj();
            DataSet ds = new DataSet();
            try
            {
                dummy.Merge(_sbobj.DisplayUsers());
                ds.Tables.Add(dummy);
            }
            catch (Exception ex)
            {

            }
            return ds.GetXml();
        }
예제 #14
0
        public static string updateUserSBStatus(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();

            _sbobj.EID = _arr[1].ToString();
            return _sbobj.UpdateUserSBStatus();
        }
예제 #15
0
        public static string overrideQB(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();
            _sbobj.Status = _arr[0].ToString();

            return _sbobj.OverrideQB();
        }
예제 #16
0
        public static string launchLiveQuestion(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();
            _sbobj.QuestionID = Convert.ToInt32(_arr[0].ToString());

            return _sbobj.LaunchLiveQuestion();
        }
예제 #17
0
        public static string updateQuestionaireNotAnswered(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();

            _sbobj.QuestionID = Convert.ToInt32(_arr[0].ToString());

            return _sbobj.UpdateQuestionaireNotAnswered();
        }
예제 #18
0
        public static string updateQuizbeeStatusI(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();

            _sbobj.QuestionID = Convert.ToInt32(_arr[0].ToString());
            return _sbobj.UpdateQuizbeeStatusI();
        }
예제 #19
0
        public static string insertRegistration(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();

            _sbobj.EID = _arr[0].ToString();
            _sbobj.Capability = _arr[1].ToString();
            _sbobj.Project = _arr[2].ToString();
            _sbobj.FirstName = _arr[3].ToString();
            _sbobj.LastName = _arr[4].ToString();

            return _sbobj.InsertRegistration();
        }
예제 #20
0
        public static string recycleA(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();

            _sbobj.QuestionID = Convert.ToInt32(_arr[0].ToString());

            return _sbobj.RecycleA();
        }
예제 #21
0
        public static string updateQuestionaire(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();

            _sbobj.QuestionID = Convert.ToInt32(_arr[0].ToString());
            _sbobj.Question = _arr[1].ToString();
            _sbobj.Answer = _arr[2].ToString();
            _sbobj.Difficulty = _arr[3].ToString();
            _sbobj.Answer1 = _arr[4].ToString();
            _sbobj.Answer2 = _arr[5].ToString();
            _sbobj.Answer3 = _arr[6].ToString();
            _sbobj.Danswer1 = _arr[7].ToString();
            _sbobj.Danswer2 = _arr[8].ToString();
            _sbobj.Danswer3 = _arr[9].ToString();

            return _sbobj.UpdateQuestionaire();
        }
예제 #22
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            SBObj _sbobj = new SBObj();

            Session["errMSG"] = "";
            Session["lanid"] = txtUserName.Text;
            if (txtUserName.Text == "")
            {
                Session["errMSG"] = "Invalid EID";
                malingmensahe.ForeColor = System.Drawing.Color.Red;
                malingmensahe.Text = "Invalid EID";
            }
            else
            {
                try
                {
                    if (Session["errMSG"].ToString().Equals(string.Empty))
                    {

                        DataTable dt = new DataTable();
                        dt = _sbobj.getLoginDetails((string)Session["lanid"]).Tables[0];
                        if (dt.Rows.Count == 0)
                        {

                            Session["errMSG"] = "Something Went Wrong";
                            Response.Redirect("~/Login.aspx");
                            Response.Cookies["lanid"].Expires = DateTime.Now.AddHours(-1);
                            Response.Cookies["Type"].Expires = DateTime.Now.AddHours(-1);

                        }
                        else
                        {
                            DataSet ds = new DataSet();
                            ds = _sbobj.getLoginDetails((string)Session["lanid"]);

                            foreach (DataRow drow in ds.Tables[0].Rows)
                            {
                                Session["Type"] = drow["Type"].ToString();
                                Session["lanid"] = drow["EID"].ToString();
                                Response.Redirect("~/Default.aspx");
                                Response.Cookies["lanid"].Expires = DateTime.Now.AddHours(1);
                                Response.Cookies["Type"].Expires = DateTime.Now.AddHours(1);
                                //Response.Cookies["lanid"].Value = txtUserName.Text.Trim();

                            }
                        }

                    }

                    else
                    {

                    }
                }
                catch (Exception)
                {
                    malingmensahe.ForeColor = System.Drawing.Color.Red;
                    malingmensahe.Text = "You are not yet Registered";
                    Response.Cookies["lanid"].Expires = DateTime.Now.AddHours(-1);
                    Response.Cookies["Type"].Expires = DateTime.Now.AddHours(-1);
                    //Response.Redirect("~/Login.aspx");
                    //malingmensahe.ForeColor = System.Drawing.Color.Red;
                    //malingmensahe.Text = "Invalid EID";
                    //throw;
                }
            }
        }
예제 #23
0
        public static string updateCorrect(List<string> _arr)
        {
            SBObj _sbobj = new SBObj();

            _sbobj.QuestionID = Convert.ToInt32(_arr[0].ToString());
            _sbobj.GuestAnswer = _arr[1].ToString();
            _sbobj.EID = _arr[2].ToString();

            return _sbobj.UpdateCorrect();
        }
예제 #24
0
        public static string userLogin(List<string> _arr)
        {
            DataTable dummy = new DataTable();

            SystemObjects.SBObj _sbobj = new SystemObjects.SBObj();
            _sbobj.EID = _arr[0].ToString();
            DataSet ds = new DataSet();
            try
            {
                dummy.Merge(_sbobj.UserLogin());
                ds.Tables.Add(dummy);
            }
            catch (Exception ex)
            {

            }
            return ds.GetXml();
        }
예제 #25
0
        public static string loadQuestionIDforNewinRoom(Int32 questid)
        {
            SBObj _sbobj = new SBObj();
            _sbobj.QuestionID = questid;
            DataSet ds = new DataSet();
            try
            {
                ds.Tables.Add(_sbobj.LoadQuestionIDforNewinRoom());
            }
            catch (Exception ex)
            {

            }
            return ds.GetXml();
        }