| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Data;
- using CoreFS.CA06;
- using System.ComponentModel;
- using System.Drawing;
- using System.Windows.Forms;
- using Infragistics.Win.UltraWinGrid;
- using System.Collections;
- namespace Core.StlMes.Client.Sale.BLL.SaleBusinessMgt.BaseData
- {
- public class ComProdKeyBll : SaleBusinessMgt.BllBase.BaseBll
- {
- private const string QUERY = @"select psc ,
- production_name ,
- standard_no_code ,
- steelcode ,
- ord_use_cd ,
- thk_min ,
- thk_max ,
- wth_min ,
- wth_max ,
- dev_spec_cd ,
- dev_dgr_cd ,
- lsteelcode ,
- sms_std_no ,
- mill_std_no ,
- ndt_std_no ,
- auto_process_tp ,
- used_tp ,
- reg_pgm_id ,
- reg_id ,
- reg_dtime ,
- mod_pgm_id ,
- mod_id ,
- mod_dtime from com_prod_key where 1 = 1 {0} ";
- public ComProdKeyBll(OpeBase ob)
- : base(ob)
- {
- }
- private DataSet GetComProdKey(string sqlCondition)
- {
- string sqlStr = string.Format(QUERY, sqlCondition);
- return base.ExecuteQuery(sqlStr, base.GetDaoName_Qlty());
- }
- /// <summary>
- /// 获取所有有效key
- /// </summary>
- /// <returns></returns>
- public DataSet GetComProdKeyUsed()
- {
- return Util.UtilDataSet.GetDataSetWithRowFilter(GetComProdKey(""), "USED_TP", "Y");
- }
- public DataSet GetComProdKeyUsedByProductionName(string productname)
- {
- string sqlcondion = string.Format(" and production_name = '{0}' and used_tp = 'Y' ", productname);
- return GetComProdKey(sqlcondion);
- }
- /// <summary>
- /// 通过牌号查询
- /// </summary>
- /// <param name="steelcode"></param>
- /// <returns></returns>
- public DataSet GetComProdKeyUsedBySteelCode(string steelcode)
- {
- string sqlcondion = string.Format(" and steelcode = '{0}' and used_tp = 'Y' ", steelcode);
- return GetComProdKey(sqlcondion);
- }
- public DataSet GetComProdKeyUsedByStandardNoCode(string standardnocode)
- {
- string sqlcondion = string.Format(" and standard_no_code = '{0}' and used_tp = 'Y' ", standardnocode);
- return GetComProdKey(sqlcondion);
- }
- }
- }
|