Пример #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();
        }