Exemplo n.º 1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            DataReadWriteHelper drw = new DataReadWriteHelper(Global.config);
            int type = 1;

            if (Int32.TryParse(txtType.Text.Trim(), out type) == false)
            {
                type = 0;
            }
            string args = "[{'name':'@sn','value':'" + txtSN.Text + "','direct':'1'},{'name':'@name','value':'" + txtName.Text + "','direct':'1'}"
                          + ",{'name':'@desc','value':'" + txtDesc.Text + "','direct':'1'},{'name':'@type','value':'" + type + "','direct':'1'},{'name':'@key','value':'" + txtKeyWord.Text + "','direct':'1'}]";

            drw.callProc("PROC_INSERT_JOB_LIST", args);
            this.Close();
        }
Exemplo n.º 2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            int postId = -1;

            if (cbPostId.SelectedIndex >= 0)
            {
                postId = (int)_listPov.ElementAt(cbPostId.SelectedIndex).ID;
            }


            DataReadWriteHelper drw = new DataReadWriteHelper(Global.config);
            string args             = "[{'name':'@name','value':'" + txtStepName.Text + "','direct':'1'},{'name':'@text','value':'" + txtStepText.Text + "','direct':'1'}"
                                      + ",{'name':'@parentid','value':'" + _parentId.ToString() + "','direct':'1'} ,{'name':'@jobid','value':'" + _jobId.ToString() + "','direct':'1'}"
                                      + ",{'name':'@type','value':'" + cbStepType.Text + "','direct':'1'},{'name':'@postid','value':'" + postId.ToString() + "','direct':'1'}]";

            drw.callProc("PROC_INSERT_SUB_JOB_LIST", args);
            this.Close();
        }