示例#1
0
        private void toolStripMenuItemPollAdd_Click(object sender, EventArgs e)
        {
            DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListPollGroup);

            if (selectedNode == null)
            {
                return;
            }
            DataRow dataRow = this.ds_poll.Tables["poll"].NewRow();

            dataRow["idpoll"]      = (object)dbconn.GetGenId("gen_poll");
            dataRow["idpollgroup"] = selectedNode["idpollgroup"];
            dataRow["dtedit"]      = (object)DateTime.Now;
            this.ds_poll.Tables["poll"].Rows.Add(dataRow);
            if (this.db.quModifDataSet(this.ds_poll) > 0)
            {
                this.SaveToBase();
            }
            MdiManager.Add((Control) new PollEditForm(dataRow));
        }