private void simpleButton4_Click(object sender, EventArgs e) {
            if (gridView1.FocusedRowHandle < -1)
                return;
            DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle) as DataRow;
            frmTaskRecordEditSet ftes = new frmTaskRecordEditSet();
            ftes.RowData = dr;
            ftes.strType = "edit";

            if (ftes.ShowDialog() == DialogResult.OK) {
                WF_TaskVar wtv = MainHelper.PlatformSqlMap.GetOneByKey<WF_TaskVar>(dr["TaskVarId"]);
                wtv.WorkTaskId = dr["WorkTaskId"].ToString();
                wtv.WorkFlowId = dr["WorkFlowId"].ToString();
                wtv.TableName = dr["TableName"].ToString();
                wtv.InitValue = dr["InitValue"].ToString();
                wtv.VarName = dr["VarName"].ToString();
                wtv.VarType = dr["VarType"].ToString();
                wtv.TableField = dr["TableField"].ToString();
                wtv.VarModule = dr["VarModule"].ToString();
                MainHelper.PlatformSqlMap.Update<WF_TaskVar>(wtv);
                refreshData();
            }
        }
 private void simpleButton3_Click(object sender, EventArgs e) {
     DataRow dr = dt.NewRow();
     frmTaskRecordEditSet ftes = new frmTaskRecordEditSet();
     dr["WorkFlowId"] = strWorkFlowID;
     ftes.RowData = dr;
     ftes.strType = "add";
     if (ftes.ShowDialog() == DialogResult.OK) {
         WF_TaskVar wtv = new WF_TaskVar();
         wtv.WorkTaskId = dr["WorkTaskId"].ToString();
         wtv.WorkFlowId = dr["WorkFlowId"].ToString();
         wtv.TableName = dr["TableName"].ToString();
         wtv.InitValue = dr["InitValue"].ToString();
         wtv.VarName = dr["VarName"].ToString();
         wtv.VarType = dr["VarType"].ToString();
         wtv.TableField = dr["TableField"].ToString();
         wtv.VarModule = dr["VarModule"].ToString();
         wtv.AccessType = "生成记录";
         MainHelper.PlatformSqlMap.Create<WF_TaskVar>(wtv);
         refreshData();
     }
 }