Exemple #1
0
        public Join()
        {
            pagetitle = "代理加盟";
            flg_nav = "join";
            if (!IsPostBack)
            {
                if (HttpContext.Current.Request.HttpMethod.ToString() == "POST")
                {
                    JmInfo info = new JmInfo();
                    info.uname = pform("uname");
                    info.age = pform("age");
                    info.address = pform("address");
                    info.telphone = pform("telphone");
                    info.fax = pform("fax");
                    info.company = pform("company");
                    info.comaddress = pform("comaddress");
                    info.zijin = pform("zijin");
                    info.content = pform("content");

                    JmDal j = new JmDal();
                    j.addnew(info);
                    HttpContext.Current.Response.Write("<script type=\"text/javascript\">alert('提交成功');location.href='join.aspx';</script>");
                    HttpContext.Current.Response.End();

                }
            }
        }
Exemple #2
0
        public void bind_del(int id)
        {
            JmDal sd = new JmDal();
            if (sd.del(id))
                showMessage("删除成功");
            else
                showMessage("删除失败");

        }
Exemple #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int id = 0;
                gnum(ref id, "id");
                JmInfo info = new JmInfo();
                JmDal jm = new JmDal();
                info = jm.read(id);

                uname.Text = info.uname;
                sex.Text = info.sex;
                address.Text = info.address;
                age.Text = info.age;
                telphone.Text = info.telphone;
                fax.Text = info.fax;
                company.Text = info.company;
                comaddress.Text = info.comaddress;
                zijin.Text = info.zijin;
                content.Text = info.content;
            }
        }