Exemple #1
0
        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            int JId = Convert.ToInt32(e.CommandArgument);

            if (e.CommandName == "Disable")
            {
                int Jshow = 1;
                JoinTheManagementBLL joinThe = new JoinTheManagementBLL();
                int count = joinThe.Disable(Jshow, JId);
                if (count > 0)
                {
                    Repeater1List();
                }
            }

            if (e.CommandName == "JoinDelete")
            {
                int Jdelete = Convert.ToInt32(Session["Mid"]);
                JoinTheManagementBLL joinThe = new JoinTheManagementBLL();
                int count = joinThe.Joindelete(Jdelete, JId);
                if (count > 0)
                {
                    Repeater1List();
                }
            }
        }
Exemple #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string name = TxtName.Value;
            JoinTheManagementBLL joinThe = new JoinTheManagementBLL();

            Repeater1.DataSource = joinThe.Thequery(name);
            Repeater1.DataBind();
        }
Exemple #3
0
        public void Repeater1List()
        {
            JoinTheManagementBLL joinThe = new JoinTheManagementBLL();

            Repeater1.DataSource = joinThe.joininfors();
            Repeater1.DataBind();
            HomeBLL bLL = new HomeBLL();

            Repeater2.DataSource = bLL.HomeTojoinin();
            Repeater2.DataBind();
        }
Exemple #4
0
        protected void Upload_Click(object sender, EventArgs e)
        {
            string filepath = Session["filename"].ToString();

            JoininforModel model = new JoininforModel();

            model.Jlogo           = "\\images\\" + filepath;
            model.Jname           = TxtJname.Value;
            model.Jintroduce      = TxtJintroduce.Value;
            model.Jprice          = TxtJprice.Value;
            model.Jperson         = Convert.ToInt32(TxtJperson.Value);
            model.Jsquare         = Convert.ToInt32(TxtJsquare.Value);
            model.Jclassification = TxtJclassification.Value;
            model.Jother          = TxtJother.Value;
            model.mId             = Convert.ToInt32(Session["Mid"]);
            JoinTheManagementBLL bLL = new JoinTheManagementBLL();
            int count = bLL.Addjoininfor(model);

            if (count > 0)
            {
                JSHelper.Alert(this, "添加成功");
            }
        }