110,533
社区成员
发帖
与我相关
我的任务
分享
DELIMITER $$
DROP PROCEDURE IF EXISTS `perf`.`CreateFactory` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateFactory`(type INTEGER)
BEGIN
CASE type
WHEN 0 THEN
--some operations
WHEN 1 THEN
--some operations
--other WHEN
ELSE
--some operations
END CASE;
END $$
DELIMITER ;
public virtual int CreateFactory(int CounterID) {
global::MySql.Data.MySqlClient.MySqlCommand command = this.CommandCollection[1];
command.Parameters[0].Value = ((int)(CounterID));
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
command.Connection.Open();
}
int returnValue;
try {
returnValue = command.ExecuteNonQuery();
}
finally {
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
command.Connection.Close();
}
}
return returnValue;
}
public virtual int CreateFactory(int CounterID) {
global::MySql.Data.MySqlClient.MySqlCommand command = this.CommandCollection[1];
command.Parameters[0].Value = ((int)(CounterID));
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
command.Connection.Open();
}
int returnValue;
try {
returnValue = command.ExecuteNonQuery();
}
finally {
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
command.Connection.Close();
}
}
return returnValue;
}