Beispiel #1
0
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     string text = this.txtTitle.Text;
     int num = int.Parse(this.radbtnType.SelectedValue);
     int num2 = int.Parse(this.lblFormID.Text);
     Maticsoft.Model.Poll.Topics model = new Maticsoft.Model.Poll.Topics {
         Title = text,
         Type = new int?(num),
         FormID = new int?(num2)
     };
     Maticsoft.BLL.Poll.Topics topics2 = new Maticsoft.BLL.Poll.Topics();
     if (topics2.Exists(num2, text))
     {
         MessageBox.ShowFailTip(this, Poll.ErrorTopicExists);
     }
     else
     {
         if (topics2.Add(model) > 0)
         {
             MessageBox.ShowSuccessTip(this, Site.TooltipSaveOK);
         }
         else
         {
             MessageBox.ShowFailTip(this, Site.TooltipSaveError);
         }
         this.Session["strWhereTopics"] = " FormID= " + this.lblFormID.Text;
         this.gridView.OnBind();
     }
 }
Beispiel #2
0
 public void BindData(int FormID)
 {
     Maticsoft.BLL.Poll.Options options = new Maticsoft.BLL.Poll.Options();
     DataTable table = options.GetCountList(FormID).Tables[0];
     this.ViewState["dtcount"] = table;
     DataSet listByForm = new Maticsoft.BLL.Poll.Topics().GetListByForm(FormID);
     this.gridViewTopic.DataSource = listByForm;
     this.gridViewTopic.DataBind();
 }
 public ActionResult Result(int fid = 1, string viewName = "Result")
 {
     List<Maticsoft.Model.Poll.Topics> modelList = new Maticsoft.BLL.Poll.Topics().GetModelList(-1, fid);
     return base.View(viewName, modelList);
 }