USE [gmg_account]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[uspt_select_goods_version]
WITH EXECUTE AS CALLER
AS
set nocount on
set lock_timeout 10000
select version_code, version_num, version_date, version_desc from tbl_goods_version
GO
// TricksterWorkTool.clsChargedItem
// Token: 0x06000030 RID: 48 RVA: 0x00004740 File Offset: 0x00002940
public SqlDataReader SelectGoodsVersion(ref SqlConnection dbCon)
{
this.sqlCmd = new SqlCommand("uspt_select_goods_version", dbCon);
this.sqlCmd.CommandType = CommandType.StoredProcedure;
SqlDataReader result;
try
{
result = this.sqlCmd.ExecuteReader();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
return result;
}
// TricksterWorkTool.frmChargedItem
// Token: 0x060002C8 RID: 712 RVA: 0x0001F298 File Offset: 0x0001D498
private void LoadGoodsVersionList()
{ short num = 0;
this.trvVersion.Nodes.Clear();
this.trvVersion.Nodes.Add(new TreeNode("ALL"));
clsChargedItem clsChargedItem = this.objChargedItem;
SqlConnection cnGoodsDB = mod_Val.gCn.CnGoodsDB;
SqlDataReader sqlDataReader = clsChargedItem.SelectGoodsVersion(ref cnGoodsDB);
Array.Clear(this.objGoodsVersion, 0, 255);
checked
{
while (sqlDataReader.Read())
{ this.VersionIndex[(int)sqlDataReader.GetInt16(1)] = num;
this.objGoodsVersion[(int)num] = new frmChargedItem.CGoodsVersion(sqlDataReader.GetInt16(0), sqlDataReader.GetInt16(1), sqlDataReader.GetDateTime(2), sqlDataReader.GetString(3));
this.LatestVersion = sqlDataReader.GetInt16(1);
this.trvVersion.Nodes[0].Nodes.Add(new TreeNode(Conversions.ToString((int)sqlDataReader.GetInt16(1)) + ". Next Patch"));
num += 1;
}
sqlDataReader.Close();
}
}
This.objGoodsVersion [(int) num] = new frmChargedItem.CGoodsVersion (sqlDataReader.GetInt16 (0), sqlDataReader.GetInt16 (1), sqlDataReader.GetDateTime (2), sqlDataReader.GetString (3));
// TricksterWorkTool.clsChargedItem
// Token: 0x06000033 RID: 51 RVA: 0x00004B24 File Offset: 0x00002D24
public DataSet SelectGoodsAll(int goods_category, int goods_category0, int goods_category1, int goods_category2, ref SqlConnection dbCon)
{
this.sqlCmd = new SqlCommand("uspt_select_goods_ini_info", dbCon);
this.sqlCmd.CommandType = CommandType.StoredProcedure;
this.sqlParam = new SqlParameter();
this.sqlParam.ParameterName = [USER=336895]goods[/USER]_category";
this.sqlParam.SqlDbType = SqlDbType.TinyInt;
this.sqlParam.Direction = ParameterDirection.Input;
this.sqlParam.Value = goods_category;
this.sqlCmd.Parameters.Add(this.sqlParam);
this.sqlParam = new SqlParameter();
this.sqlParam.ParameterName = [USER=336895]goods[/USER]_category0";
this.sqlParam.SqlDbType = SqlDbType.TinyInt;
this.sqlParam.Direction = ParameterDirection.Input;
this.sqlParam.Value = goods_category0;
this.sqlCmd.Parameters.Add(this.sqlParam);
this.sqlParam = new SqlParameter();
this.sqlParam.ParameterName = [USER=336895]goods[/USER]_category1";
this.sqlParam.SqlDbType = SqlDbType.TinyInt;
this.sqlParam.Direction = ParameterDirection.Input;
this.sqlParam.Value = goods_category1;
this.sqlCmd.Parameters.Add(this.sqlParam);
this.sqlParam = new SqlParameter();
this.sqlParam.ParameterName = [USER=336895]goods[/USER]_category2";
this.sqlParam.SqlDbType = SqlDbType.TinyInt;
this.sqlParam.Direction = ParameterDirection.Input;
this.sqlParam.Value = goods_category2;
this.sqlCmd.Parameters.Add(this.sqlParam);
this.sqlDA = new SqlDataAdapter(this.sqlCmd);
this.sqlDS = new DataSet("GoodsAllForVersion");
DataSet result;
try
{
this.sqlDA.Fill(this.sqlDS, "GoodsAllForCategory");
result = this.sqlDS;
}
catch (SqlException ex)
{
MessageBox.Show(ex.ToString(), "SQL Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
}
return result;
}
// TricksterWorkTool.frmChargedItem
// Token: 0x060002C3 RID: 707 RVA: 0x0001E38C File Offset: 0x0001C58C
private void DisplayGoods(int Cate, int Cate0, int Cate1, int Cate2)
{
ButtonCellType buttonCellType = new ButtonCellType();
buttonCellType.ButtonColor = Color.LightSlateGray;
buttonCellType.TextColor = Color.White;
buttonCellType.Text = "DEL";
buttonCellType.Text = "INSERT";
this.spnGoodsSelect_Sheet1.Columns.Get(5).CellType = buttonCellType;
this.spnGoodsSelect_Sheet1.Columns.Get(5).HorizontalAlignment = CellHorizontalAlignment.Center;
this.spnGoodsSelect_Sheet1.Columns.Get(5).Label = " -";
this.spnGoodsSelect_Sheet1.Columns.Get(5).VerticalAlignment = CellVerticalAlignment.Center;
this.spnGoodsSelect_Sheet1.Columns.Get(5).Width = 70f;
this.spncGoodsList.Sheets[0].RowCount = 0;
SheetView sheetView = this.spncGoodsList.Sheets[0];
clsChargedItem clsChargedItem = this.objChargedItem;
SqlConnection cnGoodsDB = mod_Val.gCn.CnGoodsDB;
sheetView.DataSource = clsChargedItem.SelectGoodsAll(Cate, Cate0, Cate1, Cate2, ref cnGoodsDB);
int num = 0;
checked
{
int num2 = this.spncGoodsList.Sheets[0].RowCount - 1;
for (int i = num; i <= num2; i++)
{
if (Operators.ConditionalCompareObjectEqual(this.spncGoodsList.Sheets[0].GetValue(i, 12), "0", false))
{
this.spncGoodsList.Sheets[0].SetValue(i, 14, this.Category1[Conversions.ToInteger(Operators.SubtractObject(this.spncGoodsList.Sheets[0].GetValue(i, 13), 1)), Conversions.ToInteger(Operators.SubtractObject(this.spncGoodsList.Sheets[0].GetValue(i, 14), 1))]);
this.spncGoodsList.Sheets[0].SetValue(i, 13, this.Category0[Conversions.ToInteger(this.spncGoodsList.Sheets[0].GetValue(i, 12)), Conversions.ToInteger(Operators.SubtractObject(this.spncGoodsList.Sheets[0].GetValue(i, 13), 1))]);
this.spncGoodsList.Sheets[0].SetValue(i, 12, "Characters");
}
else
{
this.spncGoodsList.Sheets[0].SetValue(i, 14, this.Category1[Conversions.ToInteger(Operators.AddObject(this.spncGoodsList.Sheets[0].GetValue(i, 13), 5)), Conversions.ToInteger(Operators.SubtractObject(this.spncGoodsList.Sheets[0].GetValue(i, 14), 1))]);
this.spncGoodsList.Sheets[0].SetValue(i, 13, this.Category0[Conversions.ToInteger(this.spncGoodsList.Sheets[0].GetValue(i, 12)), Conversions.ToInteger(Operators.SubtractObject(this.spncGoodsList.Sheets[0].GetValue(i, 13), 1))]);
this.spncGoodsList.Sheets[0].SetValue(i, 12, "My Camp");
}
}
}
}
USE [gmg_account]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[uspt_select_goods_ini_info]
[USER=336895]goods[/USER]_category [tinyint],
[USER=336895]goods[/USER]_category0 [tinyint],
[USER=336895]goods[/USER]_category1 [tinyint],
[USER=336895]goods[/USER]_category2 [tinyint]
WITH EXECUTE AS CALLER
AS
set nocount on
set lock_timeout 10000
BEGIN
select * from tbl_goods
where goods_category = [USER=336895]goods[/USER]_category
and goods_category0 = [USER=336895]goods[/USER]_category0
and goods_category1 = [USER=336895]goods[/USER]_category1
and goods_category2 = [USER=336895]goods[/USER]_category2
END
GO