Esempio n. 1
0
 partial void DeleteAnsLog(AnsLog instance);
Esempio n. 2
0
 partial void InsertAnsLog(AnsLog instance);
Esempio n. 3
0
 partial void UpdateAnsLog(AnsLog instance);
Esempio n. 4
0
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            string shi = DropDownList1.SelectedItem.Text;

            if (DropDownList1.SelectedValue.Equals("-1"))
            {
                _OftenClass.Alert(this, "请选择市(地)!");
                return;
            }
            string xian = DropDownList2.SelectedItem.Text;

            if (DropDownList2.SelectedValue.Equals("-1"))
            {
                _OftenClass.Alert(this, "请选择县(市、区)!");
                return;
            }
            string zhen = TextBox1.Text.Trim();

            if (zhen.Equals(""))
            {
                _OftenClass.Alert(this, "请填写镇!");
                return;
            }
            string cun = TextBox2.Text.Trim();

            if (cun.Equals(""))
            {
                _OftenClass.Alert(this, "请填写村!");
                return;
            }
            string v1 = "";

            for (int i = 1; i <= 27; i++)
            {
                string v = (Request.Form["radio" + i] + "").Replace(",", "");
                if (v == "")
                {
                    _OftenClass.Alert(this, string.Format("请选择第{0}个问题!", i));
                    return;
                }
                v1 += v + ",";
            }
            for (int i = 28; i <= 34; i++)
            {
                string v = "";
                bool   b = false;
                for (int j = 1; j <= 5; j++)
                {
                    v = (Request.Form["radio" + i + "0" + j] + "").Replace(",", "");
                    if (v != "")
                    {
                        b = true;
                    }
                    v1 += v;
                }
                if (!b)
                {
                    _OftenClass.Alert(this, string.Format("请选择第{0}个问题!", i));
                    return;
                }
                v1 += ",";
            }
            v1 = _OftenClass.Deld(v1);
            var al = new Models.AnsLog
            {
                Ans     = v1,
                AddTime = DateTime.Now,
                cun     = cun,
                Ip      = Request.UserHostAddress,
                shi     = shi,
                xian    = xian,
                zhen    = zhen
            };

            db.AnsLog.InsertOnSubmit(al);
            db.SubmitChanges();
            //MultiView1.ActiveViewIndex = 1;
            _OftenClass.Go1(this, "提交成功,感谢参与!", this.Request.RawUrl);
        }