Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PageAuthorized.check(Request, Response);

            DataSet apptSet = new DataSet();
            Appt    a       = new Appt();

            int initialWall = 1;

            if (IsPostBack)
            {
                initialWall = Convert.ToInt32(wallList.SelectedValue);
            }
            else
            {
                if (!string.IsNullOrEmpty(Request["initial"]))
                {
                    initialWall = Convert.ToInt32(Request["initial"]);
                }
            }

            initWalls(initialWall);
            a["wall_id"]         = initialWall;
            a["organization_id"] = Organization.Current.id.Value;
            a["tzoffset"]        = LiftTime.UserTzOffset;

            apptSet = a.doQuery("get_wall_subscribers");

            wallManageRenderer = new WallManageRenderer(apptSet);
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (LiftDomain.User.IsLoggedIn)
            {
                Appt    a       = new Appt();
                DataSet apptSet = a.doQuery("get_stats");

                wallRenderer = new WallRenderer(apptSet);

                sentence1  = Organization.Current.title.ToString();
                sentence1 += " has ";

                LiftDomain.Wall w     = new LiftDomain.Wall();
                long            walls = w.doCommand("get_wall_count");

                sentence1 += walls.ToString();

                sentence1 += " prayer walls.";

                sentence1 = Language.Current.translate(sentence1);
            }
            else
            {
                Response.Redirect("Login.aspx?target=Wall.aspx");
            }
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string action = string.Empty;
            string tod    = string.Empty;
            string dow    = string.Empty;
            string userId = string.Empty;
            string wallId = string.Empty;

            action = Request["action"];
            tod    = Request["tod"];
            dow    = Request["dow"];
            userId = Request["user_id"];
            wallId = Request["wall_id"];

            Appt a = new Appt();

            if (action == "s") // subscribe
            {
                a["dow"]     = dow;
                a["tod"]     = tod;
                a["user_id"] = userId;
                a["wall_id"] = wallId;
                a.doCommand("subscribe");
            }
            else if (action == "u") // unsubscribe, then subscribe
            {
                Appt userAppt = new Appt();
                userAppt["user_id"] = userId;
                DataSet userApptSet = userAppt.doQuery("get_user_time");
                if (!DatabaseObject.isNullOrEmpty(userApptSet))
                {
                    DataRow apptRow = userApptSet.Tables[0].Rows[0];

                    Appt unsub = new Appt();
                    unsub["dow"]     = apptRow["my_dow"];
                    unsub["tod"]     = apptRow["my_tod"];
                    unsub["user_id"] = userId;
                    unsub.doCommand("unsubscribe");
                }

                Appt sub = new Appt();
                sub["dow"]     = dow;
                sub["tod"]     = tod;
                sub["user_id"] = userId;
                sub["wall_id"] = wallId;
                sub.doCommand("subscribe");
            }
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string userId = string.Empty;

            userId = Request["user_id"];

            Appt userAppt = new Appt();

            userAppt["user_id"] = userId;
            DataSet userApptSet = userAppt.doQuery("get_user_time");

            if (!DatabaseObject.isNullOrEmpty(userApptSet))
            {
                DataRow apptRow = userApptSet.Tables[0].Rows[0];

                Appt unsub = new Appt();
                unsub["dow"]     = apptRow["my_dow"];
                unsub["tod"]     = apptRow["my_tod"];
                unsub["user_id"] = userId;
                unsub.doCommand("unsubscribe");
            }
        }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PageAuthorized.check(Request, Response);

            Appt a = new Appt();

            string q = Request["q"];

            a["q"]               = q;
            a["tzoffset"]        = LiftDomain.LiftTime.UserTzOffset;
            a["organization_id"] = Organization.Current.id.Value;
            DataSet userSet = a.doQuery("get_users_like");

            Response.ContentType = "text/plain";

            userRenderer = new WallManageAutoCompleteRenderer(userSet);

            string cell = Request["cell"];

            string[] parts = cell.Split(new char[] { '_' });
            userRenderer.wallId = parts[0];
            userRenderer.dow    = parts[1];
            userRenderer.tod    = parts[2];
        }