| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// ä½ä¸æå¯¼ä¹¦å é¤ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Gy_SOPBill/Del")] |
| | | [HttpGet] |
| | | public object Del(string hmainid, string hsubid, string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //å 餿é |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_SOPBill_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (string.IsNullOrWhiteSpace(hmainid)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "èµæå
ç 为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | ds = oCN.RunProcReturn("select * from Gy_SOPBillSub where HInterID=" + hmainid + " and HEntryID=" + hsubid, "Gy_SOPBillSub"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ²¡ææ°æ®ï¼æ æ³å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | |
| | | oCN.RunProc("delete Gy_SOPBillSub where HInterID=" + hmainid + " and HEntryID=" + hsubid); |
| | | oCN.RunProc("delete Gy_SOPBillSub2 where HInterID=" + hmainid + " and HEntryID=" + hsubid); |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä½ä¸æå¯¼ä¹¦å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #region å¼åº |
| | | [Route("Gy_SOPBill/SetExcel")] |
| | | [HttpGet] |
| | |
| | | return response; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | // |
| | | private Int32 Fun_GetCol(string sCol) |