| 代码如下 | 复制代码 |
|
public void NewRecord()
{ IsGetData = true; try { Cursor.Current = Cursors.WaitCursor; string strSQL = ""; //m_State = 0; this.tb_storeTableAdapter.Connection.ConnectionString = GlobalVariable.m_Conn;
if (GlobalVariable.Conn.State == ConnectionState.Closed) GlobalVariable.Conn.Open();
SqlCommand cmd = GlobalVariable.Conn.CreateCommand(); System.Data.SqlClient.SqlDataAdapter da = null; DataSet ds = new DataSet(); string ls_gcode="";
this.LblGCode.Text = ""; this.LblName.Text = ""; this.LblModel.Text = ""; if (this.hHDataSet.Tables["tb_store"] != null) { this.hHDataSet.Tables["tb_store"].Clear(); } if (this.TxtBarcode.Text.Trim().Length
{
strSQL = "Select c_gcode from tb_gds (nolock) " + " where c_gcode='" + this.TxtBarcode.Text.Trim() + "'"; cmd.CommandText = strSQL; cmd.CommandType = CommandType.Text; da = new SqlDataAdapter(cmd); da.Fill(ds, "tb_gds"); if (ds.Tables["tb_gds"].Rows.Count > 0) { ls_gcode = ds.Tables["tb_gds"].Rows[0]["c_gcode"].ToString(); } if (ls_gcode.Length
{
//this.LblName.Text = "扫描的商品未找到!"; if (this.TxtBarcode.Text.Length > 0) MessageBox.Show("扫描的商品未找到!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); } } else { strSQL = "Select c_gcode from tb_barcode (nolock) " + " where c_barcode='" + this.TxtBarcode.Text.Trim() + "'"; cmd.CommandText = strSQL; cmd.CommandType = CommandType.Text; da = new SqlDataAdapter(cmd); da.Fill(ds, "c_barcode"); if (ds.Tables["c_barcode"].Rows.Count > 0) { ls_gcode = ds.Tables["c_barcode"].Rows[0]["c_gcode"].ToString(); } if (ls_gcode.Length
{
//this.LblName.Text = "扫描的商品未找到!"; if (this.TxtBarcode.Text.Length > 0) MessageBox.Show("扫描的商品未找到!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); } } strSQL = "Select a.c_gcode,a.c_name,a.c_model,b.c_number,b.c_move_in_number,b.c_move_out_number,b.c_onway_sale_number,b.c_onway_w_number " +
" from tb_gds a (nolock),tb_gdsadno b(nolock) " + " where a.c_gcode=b.c_gcode and b.c_gcode='" + ls_gcode + "' and b.c_store_id='" + GlobalVariable.m_CompID + "' "; cmd.CommandText = strSQL; cmd.CommandType = CommandType.Text; da = new SqlDataAdapter(cmd); if (this.hHDataSet.Tables["tb_store"] != null) { this.hHDataSet.Tables["tb_store"].Clear(); } da.Fill(this.hHDataSet, "tb_store"); GetDataList();
SumTotal(); da.Dispose();
ds.Dispose(); cmd.Dispose(); } catch (Exception ex) { MessageBox.Show("数据库连接失败! " + ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); } IsGetData = false;
Cursor.Current = Cursors.Default; } |
|
DeepSeek多模态怎么样及保姆级配置教程(codex、claude)实用指南
WSL2+Docker+Ollama本地部署大模型思路和实践指南(Qwen1.8b)实用指南
DeepSeek Harness热门插件盘点:10个实用插件,覆盖多Agent、上下文和多模态实用指南
grep文本搜索与正则表达式完整代码示例实用指南
AI漫剧伪装直男1‑24集无雾版夸克网盘资源免费分享
AI漫剧玉僧入尘1-68集无雾无删版夸克网盘资源免费分享