public bool UpdateBetNumber(int type, string title) { using (DbOperHandler dbOperHandler = new ComData().Doh()) { dbOperHandler.Reset(); dbOperHandler.SqlCmd = "select top 1 Type,Title,Number from Sys_LotteryData where Id=" + title; DataTable dataTable = dbOperHandler.GetDataTable(); if (dataTable.Rows.Count > 0) { LotteryCheck.AdminRunOper(Convert.ToInt32(dataTable.Rows[0]["Type"].ToString()), dataTable.Rows[0]["Title"].ToString(), dataTable.Rows[0]["Number"].ToString()); return(true); } } return(false); }
public bool UpdateAllBetNumber(int type) { using (DbOperHandler dbOperHandler = new ComData().Doh()) { dbOperHandler.Reset(); dbOperHandler.SqlCmd = "select top 1 Type,Title,Number from Sys_LotteryData where Type=" + (object)type + " order by Title desc"; DataTable dataTable = dbOperHandler.GetDataTable(); if (dataTable.Rows.Count > 0) { for (int index = 0; index < dataTable.Rows.Count; ++index) { LotteryCheck.AdminRunOper(Convert.ToInt32(dataTable.Rows[index]["Type"].ToString()), dataTable.Rows[index]["Title"].ToString(), dataTable.Rows[index]["Number"].ToString()); } } } return(true); }