| | |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere, "h_v_Sc_ProcessExchangeBillQuery"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery", "h_v_Sc_ProcessExchangeBillQuery"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有返回任何记录!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 "; |
| | | string sql = sql1 + sWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessExchangeBillQuery"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "获取信息成功!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | return GetObjectJson(ds); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | return GetObjectJson(ds); |
| | | } |
| | | |
| | | #region 工艺路线 |
| | | |
| | | #region 工艺路线列表 |
| | | /// <summary> |
| | | /// 返回工艺路线列表 |
| | | ///参数:string sql。 |
| | |
| | | } |
| | | return GetObjectJson(ds); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 工艺路线 删除 |
| | | /// <summary> |
| | | /// 工艺路线删除功能 |
| | | /// </summary> |
| | |
| | | try |
| | | { |
| | | //删除权限 |
| | | //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName)) |
| | | //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//开始事务 |
| | | ds = oCN.RunProcReturn("select * from Gy_RoutingBillSub where HInterID=" + lngBillKey, "Gy_RoutingBillSub"); |
| | | ds = oCN.RunProcReturn("select * from Gy_RoutingBillmain where HInterID=" + lngBillKey, "Gy_RoutingBillmain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | //string HChecker = Convert.ToString(ds.Tables[0].Rows[0]["HChecker"]); |
| | | //if (HChecker != " ") |
| | | string HChecker = Convert.ToString(ds.Tables[0].Rows[0]["HChecker"]); |
| | | //string hdeleteman = Convert.ToString(ds.Tables[0].Rows[0]["hdeleteman"]); |
| | | if (HChecker != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据已经审核,不能删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //if (hdeleteman != "") |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "单据已经审核,不能删除!"; |
| | | // objJsonResult.Message = "单据已经作废,不能删除!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 返回生产任务单列表 |