| | |
| | | /// |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="IsAudit">ç¦ç¨(0),åç¦ç¨(1)</param> |
| | | /// <param name="IsStop">ç¦ç¨(0),åç¦ç¨(1)</param> |
| | | /// <param name="CurUserName">å®¡æ ¸äºº</param> |
| | | /// <returns></returns> |
| | | [Route("Gy_MaterType/StopGy_MaterType")] |
| | | [HttpGet] |
| | | public object StopGy_MaterType(int HInterID, int IsAudit, string CurUserName) |
| | | public object StopGy_MaterType(int HInterID, int IsStop, string CurUserName) |
| | | { |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterType_Check", 1, false, CurUserName)) |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterType_Stop", 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.Message = "ç¦ç¨å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | var ds = oCN.RunProcReturn("select * from Gy_MaterType where HItemID=" + HInterID, "Gy_MaterType"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (IsAudit == 0) //ç¦ç¨å¤æ |
| | | if (IsStop == 0) //ç¦ç¨å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "") |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åç¦ç¨å¤æ |
| | | if (IsStop == 1) //åç¦ç¨å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() == "") |
| | | { |
| | |
| | | |
| | | oCN.BeginTran(); |
| | | |
| | | if (IsAudit == 0) //ç¦ç¨å¤æ |
| | | if (IsStop == 0) //ç¦ç¨å¤æ |
| | | { |
| | | oCN.RunProc("update Gy_MaterType set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID); |
| | | |
| | |
| | | objJsonResult.Message = "ç¦ç¨æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | if (IsAudit == 1) //åç¦ç¨å¤æ |
| | | if (IsStop == 1) //åç¦ç¨å¤æ |
| | | { |
| | | oCN.RunProc("update Gy_MaterType set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID); |
| | | |
| | |
| | | if (strLen.Length == num && dt.Rows[i]["hnumber"].ToString().Contains(tree[m].id + ".")) |
| | | { |
| | | TreeModel tbjson = new TreeModel(); |
| | | tbjson.id = dt.Rows[i]["hnumber"].ToString(); |
| | | tbjson.id = dt.Rows[i]["hitemid"].ToString(); |
| | | tbjson.title = dt.Rows[i]["hname"].ToString(); |
| | | tree[m].children.Add(tbjson); |
| | | } |