Odg: IsNumeric

Glih to imam pri roki: 

using (SqlConnection conn = new SqlConnection(connectionString))

using (SqlCommand cmd = new SqlCommand(

(SqlConnection conn = new SqlConnection(connectionString))

using (SqlCommand cmd = new SqlCommand(

using (SqlCommand cmd = new SqlCommand(

@"

INSERT INTO WorkflowTracking (InstanceId, ActivityId, UserName, ActivityName, ActionType, IsTimeout) VALUES

(@InstanceId, @ActivityId, @UserName, @ActivityName, @ActionType, @IsTimeout)", conn))

{

cmd.Parameters.AddWithValue("@InstanceId", parameters.InstanceId);

cmd.Parameters.AddWithValue("@ActivityId", activityId);

cmd.Parameters.AddWithValue("@UserName", user == null ? DBNull.Value: (object)user);

cmd.Parameters.AddWithValue("@ActivityName", activityName);

cmd.Parameters.AddWithValue("@ActionType", actionType.ToString());

cmd.Parameters.AddWithValue("@IsTimeout", isTimeout);

conn.Open();

cmd.ExecuteNonQuery();

}

Ni ravno select, je pa dinamičen. Smile

, conn))

{

cmd.Parameters.AddWithValue("@InstanceId", parameters.InstanceId);

cmd.Parameters.AddWithValue("@ActivityId", activityId);

cmd.Parameters.AddWithValue("@UserName", user == null ? DBNull.Value: (object)user);

cmd.Parameters.AddWithValue("@ActivityName", activityName);

cmd.Parameters.AddWithValue("@ActionType", actionType.ToString());

cmd.Parameters.AddWithValue("@IsTimeout", isTimeout);

conn.Open();

cmd.ExecuteNonQuery();

}

Ni ravno select, je pa dinamičen. Smile

"@InstanceId", parameters.InstanceId);

cmd.Parameters.AddWithValue("@ActivityId", activityId);

cmd.Parameters.AddWithValue("@UserName", user == null ? DBNull.Value: (object)user);

cmd.Parameters.AddWithValue("@ActivityName", activityName);

cmd.Parameters.AddWithValue("@ActionType", actionType.ToString());

cmd.Parameters.AddWithValue("@IsTimeout", isTimeout);

conn.Open();

cmd.ExecuteNonQuery();

}

Ni ravno select, je pa dinamičen. Smile

"@ActivityId", activityId);

cmd.Parameters.AddWithValue("@UserName", user == null ? DBNull.Value: (object)user);

cmd.Parameters.AddWithValue("@ActivityName", activityName);

cmd.Parameters.AddWithValue("@ActionType", actionType.ToString());

cmd.Parameters.AddWithValue("@IsTimeout", isTimeout);

conn.Open();

cmd.ExecuteNonQuery();

}

Ni ravno select, je pa dinamičen. Smile

"@UserName", user == null ? DBNull.Value: (object)user);

cmd.Parameters.AddWithValue("@ActivityName", activityName);

cmd.Parameters.AddWithValue("@ActionType", actionType.ToString());

cmd.Parameters.AddWithValue("@IsTimeout", isTimeout);

conn.Open();

cmd.ExecuteNonQuery();

}

Ni ravno select, je pa dinamičen. Smile

"@ActivityName", activityName);

cmd.Parameters.AddWithValue("@ActionType", actionType.ToString());

cmd.Parameters.AddWithValue("@IsTimeout", isTimeout);

conn.Open();

cmd.ExecuteNonQuery();

}

Ni ravno select, je pa dinamičen. Smile

"@ActionType", actionType.ToString());

cmd.Parameters.AddWithValue("@IsTimeout", isTimeout);

conn.Open();

cmd.ExecuteNonQuery();

}

Ni ravno select, je pa dinamičen. Smile

"@IsTimeout", isTimeout);

conn.Open();

cmd.ExecuteNonQuery();

}

Ni ravno select, je pa dinamičen. Smile

Ni ravno select, je pa dinamičen. Smile
Avtor: MihaM, objavljeno na portalu SloDug.si (Arhiv)

Leave a comment

Please note that we won't show your email to others, or use it for sending unwanted emails. We will only use it to render your Gravatar image and to validate you as a real person.