| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | public int UpdateTableConfig(string selectedWater, string selectedFlow, string tableData, string mxguid) |
| | | { |
| | | var sqlParams = new List<SugarParameter> { |
| | | new("@selectedWater", selectedWater), |
| | | new("@selectedFlow", selectedFlow), |
| | | new("@tableData", tableData), |
| | | new("@mxguid", mxguid) |
| | | }; |
| | | |
| | | var sql = @"UPDATE MES_QA_ITEMS_DETECT_DETAIL5 |
| | | SET ipqc_zrxn_sel1 = @selectedWater, |
| | | ipqc_zrxn_sel2 = @selectedFlow, |
| | | ipqc_zrxn_table = @tableData |
| | | WHERE guid = @mxguid"; |
| | | |
| | | return Db.Ado.ExecuteCommand(sql, sqlParams); |
| | | } |
| | | |
| | | public dynamic GetTableConfig(string mxguid) |
| | | { |
| | | var sqlParams = new List<SugarParameter> { |
| | | new("@mxguid", mxguid) |
| | | }; |
| | | |
| | | var sql = @"SELECT ipqc_zrxn_sel1,ipqc_zrxn_sel2,ipqc_zrxn_table |
| | | FROM MES_QA_ITEMS_DETECT_DETAIL5 |
| | | WHERE guid = @mxguid"; |
| | | |
| | | var result = Db.Ado.SqlQuery<dynamic>(sql, sqlParams).FirstOrDefault(); |
| | | |
| | | if (result == null) |
| | | throw new Exception("配置信息查询结果为空"); |
| | | |
| | | return result; |
| | | } |
| | | } |