| | |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Repair", 1, false, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Repair_List", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | | //{ |
| | | //objJsonResult.code = "0"; |
| | | //objJsonResult.count = 0; |
| | | //objJsonResult.Message = "æ æ°æ®"; |
| | | //objJsonResult.data = null; |
| | | //return objJsonResult; |
| | | //} |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | // 代ç é¤å»èªèº«å¤ ä¸è½éå¤ |
| | | var dsHNumberCheck = oCN.RunProcReturn($@" |
| | | select top 1 HItemID from Gy_Repair where HStopflag = 0 and HNumber = '{HNumber}' and HItemID != {HItemID} |
| | | ", "Gy_Repair"); |
| | | |
| | | if (dsHNumberCheck.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç éå¤!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCN.BeginTran(); |
| | | |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | DataSet ds = oCN.RunProcReturn("Exec h_p_Gy_Repair_BeforeSaveCtrl " + msg3 + ",'1'", "h_p_Gy_Repair_BeforeSaveCtrl"); |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | // 代ç ä¸è½éå¤ |
| | | var dsHNumberCheck = oCN.RunProcReturn($@" |
| | | select top 1 HItemID from Gy_Repair where HStopflag = 0 and HNumber = '{HNumber}' |
| | | ", "Gy_Repair"); |
| | | |
| | | if (dsHNumberCheck.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç éå¤!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCN.BeginTran(); |
| | |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("维修项ç®ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç¹æ£é¡¹ç®ä»£ç ãçæ é¢,"; |
| | | error += "æ²¡ææ¾å°ã维修项ç®ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("维修项ç®åç§°")) |
| | | error += "æ²¡ææ¾å°ãç¹æ£é¡¹ç®åç§°ãçæ é¢,"; |
| | | error += "æ²¡ææ¾å°ã维修项ç®åç§°ãçæ é¢,"; |
| | | |
| | | if (error.Length > 0) |
| | | { |