Skip to main content

Process link creation

You can create a process link with the code at the bottom.

private string getProcessURL(string akisId)
{
QueryStringLoginParameters queryParameters = new QueryStringLoginParameters();
queryParameters.LeftMenuVisible = true;
queryParameters.TopBarVisible = true;
queryParameters.ExpireDateTick = DateTime.Now.AddDays(2). Ticks;
queryParameters.ClickCount = 1;
queryParameters.Action = "[ProcessRequest][" + akisId + "][" +getRequestId() + "]";
string url = QueryStringAuthentication.GetUrl(LogonUser, queryParameters);
return url;
}
public string getRequestId()
{
eBAForm frm = new eBAForm(id);
string pid="";
eBADBProvider db = CreateDatabaseProvider();
SqlConnection con = (SqlConnection)db. Connection;
Con. open();
Try
{
string query =@"SELECT MAX(ID) FROM FLOWREQUESTS WHERE PROCESSID='" + frm. OwnerProcessId.ToString() + "' ";
SqlCommand cmd = new SqlCommand(query,con);
SqlDataAdapter also = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
also. Fill(dt);
if(dt. Rows.Count```>```0)
{
pid=dt. Rows[0][0]. ToString();
}
}
finally
{
Con. Close();
}
return pid;
}

public void btnSurecLinki_OnClick(Object sender, EventArgs e)
{
string processid = "764";
ProcessRequest.Text=getProcessURL(processid);
}