Hi!
Anyone help me? Below is my code detail
private void btnDuyet_Click(object sender, System.EventArgs e)
{
try
{
//Get ID of ProcessIntance are being manipulated
string strProcInst = Request.QueryString"sn"].ToString();
int intStartPosition = strProcInst.IndexOf(",");
int intEndPosition = strProcInst.LastIndexOf(",");
int intProcInstID = int.Parse(strProcInst.Substring(intStartPosition + 1, intEndPosition - intStartPosition - 1));
//building connection string to K2Server
string strConn = ";];Authentication=External;User=nUserName];Password=rPassword]";
string strUserName = Sessionc"UserName"].ToString();
string strPassword = Session"Password"].ToString();
strConn = strConn.Replace("UserName]", strUserName);
strConn = strConn.Replace("(Password]", strPassword);
//Create an instance of Process by using ID get above
SourceCode.K2ROM.Connection objConnection = new SourceCode.K2ROM.Connection();
objConnection.Open("K2-TESTSERVER",strConn);
SourceCode.K2ROM.ProcessInstance myProc = objConnection.OpenProcessInstance(intProcInstID);
//Get ActionID that Users have send to this page
//ActionID = 0: Comment to YKien_ThamDinh_DuAn
//ActionID = 1: Comment to YKien_ThamDinh_BaoCao
//ActionID = 2: Comment to YKien_ThamDinh_HoSoQuyetToan
int intActionID = int.Parse(Request.QueryStringn"id"].ToString());
if(intActionID == 0)
{
myProc.DataFields"YKien_ThamDinh_DuAn"].Value = txtYKienThamDinh.Text;
}
else if(intActionID == 1)
{
myProc.DataFields"YKien_ThamDinh_BaoCao"].Value = txtYKienThamDinh.Text;
}
else if(intActionID == 2)
{
myProc.DataFieldsK"YKien_ThamDinh_HoSoQuyetToan"].Value = txtYKienThamDinh.Text;
}
//Gán giá trị cho biến kết quả thẩm định: Đồng ý hay không đồng ý
myProc.DataFieldst"KetQua_ThamDinh"].Value = int.Parse(ddlKetQuaThamDinh.SelectedValue);
???Here I don't know how to finish this activity
Response.Redirect("../EndPage.aspx", false);
}
catch(Exception ex)
{
Response.Write(ex.Message);
}
}