Пример #1
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");
            }
        }
Пример #2
0
        protected void initWalls(int initialValue)
        {
            wallList.Items.Clear();
            LiftDomain.Wall        wall  = new LiftDomain.Wall();
            List <LiftDomain.Wall> wList = wall.doQuery <LiftDomain.Wall>("select");



            foreach (LiftDomain.Wall w in wList)
            {
                wallList.Items.Add(new ListItem(w.title, w.id.Value.ToString()));
            }


            foreach (ListItem li in wallList.Items)
            {
                object val = li.Value;
                try
                {
                    if (Convert.ToInt32(val) == initialValue)
                    {
                        li.Selected = true;
                    }
                    else
                    {
                        li.Selected = false;
                    }
                }
                catch (Exception x)
                {
                    string m = x.Message;
                }
            }
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PageAuthorized.check(Request, Response);

            LiftDomain.Wall w = new LiftDomain.Wall();
            w.id.Value = Convert.ToInt32(Request["id"]);
            w.doCommand("remove");

            Response.Redirect("WallList.aspx");
        }
Пример #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PageAuthorized.check(Request, Response);

            LiftDomain.Wall w = new LiftDomain.Wall();

            w.user_id.Value = Convert.ToInt32(Request["user_id"]);
            w.id.Value      = Convert.ToInt32(Request["wall_id"]);

            w.doCommand("update");
        }
Пример #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PageAuthorized.check(Request, Response);

            string idStr = Request["id"];

            valueStr = Request["value"];

            LiftDomain.Wall w = new LiftDomain.Wall();

            w.id.Value    = Convert.ToInt32(idStr);
            w.title.Value = valueStr;

            w.doCommand("update");
        }
Пример #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PageAuthorized.check(Request, Response);

            addBtn.Text = "Add new Wall";

            if (IsPostBack)
            {
                LiftDomain.Wall newWall = new LiftDomain.Wall();
                newWall.title.Value   = wall_title.Text;
                newWall.user_id.Value = LiftDomain.Organization.Current.user_id.Value;
                newWall.doCommand("insert");
            }

            wall_title.Text = "";
            LiftDomain.Wall w       = new LiftDomain.Wall();
            DataSet         wallSet = w.doQuery("get_walls");

            wallListRenderer = new PartialRenderer(HttpContext.Current, wallSet, "_WallList.htm", new PartialRenderer.RenderHelper(render_helper));
        }