public static void SP_WCS_SHP_INIT(string P_EZ_STATUS) { string procedureName = "SP_WCS_SHP_INIT"; using (OracleConnection oracleConnection = new OracleConnection(_connectionString)) { oracleConnection.Open(); OracleCommand oracleCommand = new OracleCommand(procedureName, oracleConnection); oracleCommand.CommandType = CommandType.StoredProcedure; oracleCommand.Parameters.Clear(); oracleCommand.Parameters.Add("P_EZ_STATUS", OracleDbType.Varchar2, 32767).Value = P_EZ_STATUS; oracleCommand.Parameters.Add("P_TARGET", OracleDbType.Varchar2, 32767).Direction = ParameterDirection.Output; oracleCommand.Parameters.Add("P_RTN_STATUS", OracleDbType.Varchar2, 32767).Direction = ParameterDirection.Output; oracleCommand.Parameters.Add("P_RTN_FLAG", OracleDbType.Varchar2, 32767).Direction = ParameterDirection.Output; oracleCommand.Parameters.Add("P_ERR_MSG", OracleDbType.Varchar2, 32767).Direction = ParameterDirection.Output; oracleCommand.ExecuteNonQuery(); oracleConnection.Close(); InitList.SetValue("P_TARGET", oracleCommand.Parameters["P_TARGET"].Value.ToString()); InitList.SetValue("P_RTN_STATUS", oracleCommand.Parameters["P_RTN_STATUS"].Value.ToString()); InitList.SetValue("P_RTN_FLAG", oracleCommand.Parameters["P_RTN_FLAG"].Value.ToString()); InitList.SetValue("P_ERR_MSG", oracleCommand.Parameters["P_ERR_MSG"].Value.ToString()); } }
public MainForm() { InitializeComponent(); m_addMessageDelegate = new AddListItem(this.addMessage); m_removeMessageDelegate = new RemoveListItem(this.removeMessage); m_initMessageListDelegate = new InitList(this.initializeMessageList); m_updateStatusDelegate = new UpdateStatus(this.updateStatus); m_dispErrorMessageDelegate = new DispErrorMessage(this.displayErrorMessage); }
public void StartCombat() { InitList = new InitList(PlayerList(), MonsterList()); Transform InitTable = Tables.GetChild(0).GetChild(1); TableManager tm = InitTable.GetComponent <TableManager>(); tm.InitializeTable(); foreach (Creature c in InitList.List) { Transform temp = Instantiate(InitTemplate, InitTable); temp.GetChild(0).GetComponent <TextMeshProUGUI>().text = c.name; temp.gameObject.SetActive(true); temp.GetChild(1).gameObject.SetActive(false); tm.data.Add(temp); } tm.BuildTable(); tm.data[0].GetChild(1).gameObject.SetActive(true); SetRound(1); }
public List <T> GetListByReader <T>(List <System.Data.Common.DbParameter> parameters, string cmdText, InitList <T> dataAction, System.Data.CommandType cmdType = System.Data.CommandType.Text) { return(MSSqlDatabaseFactory.GetListByReader <T>(_config.DatabaseConnection, ParseParameter(parameters), cmdText, cmdType, dataAction)); }
internal static List <T> GetListByReader <T>(string connectionString, List <SqlParameter> parameters, string cmdText, CommandType cmdType, InitList <T> dataAction) { SqlConnection con = new SqlConnection(connectionString); SqlCommand cmd = new SqlCommand(cmdText, con); if (parameters != null) { cmd.Parameters.AddRange(parameters.ToArray()); } cmd.CommandType = cmdType; con.Open(); var dataReader = cmd.ExecuteReader(); List <T> data = dataAction(dataReader); dataReader.Close(); con.Close(); return(data); }
public void _initCauHinhMauPhieu(InitList listPhieu) { //Khai báo đúng dạng bên dưới //ListMaPhieu = new Dictionary<int, string>(); //ListMaPhieu.Add(1, "MA_PNKHT;nhập kho hàng trả"); //ListMaPhieu.Add(2, "MA_PNKHM;nhập kho hàng mua"); //ListMaPhieu.Add(3, "MA_PXKHT;xuất kho hàng trả"); //ListMaPhieu.Add(4, "MA_PXKHB;xuất kho hàng bán"); //ListMaPhieu.Add(5, "MA_PCK;chuyển kho"); //ListMaPhieu.Add(8, "MA_PKK;kiểm kho"); if (listPhieu != null) { this.Error = HelpInputData.GetErrorProvider(this); ListMaPhieu = listPhieu(); InitControl(); } }