| | |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//开始事务 |
| | | string HNumber = ""; |
| | | string HName = ""; |
| | | ds = oCN.RunProcReturn("select * from Gy_Employee where HItemID=" + HItemID, "Gy_Employee"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | else |
| | | { |
| | | HNumber = ds.Tables[0].Rows[0]["HNumber"].ToString(); |
| | | HName = ds.Tables[0].Rows[0]["HName"].ToString(); |
| | | } |
| | | |
| | | |
| | | var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]); |
| | | if (HStopflag) |
| | | { |
| | |
| | | } |
| | | |
| | | oCN.RunProc("delete from Gy_Employee where HItemID=" + HItemID); |
| | | |
| | | |
| | | |
| | | //写入日志 |
| | | string Operation = "删除"; //操作 |
| | | string ComputerName = System.Net.Dns.GetHostName(); //设备名称 |
| | | string WorkList = Operation + "职员,职员代码:" + HNumber + ";职员名称:" + HName ; //操作详情 |
| | | string MvarReportTitle = "职员列表"; //操作模块 |
| | | string SystemName = "LMES-" + MvarReportTitle + "模块"; //操作模块 |
| | | string IPAddress = ""; |
| | | //string IPAddress = Dns.GetHostEntry(Dns.GetHostName()).AddressList[0].ToString(); //IP地址 |
| | | //string IPAddress = System.Web.HttpContext.Current.Request.UserHostAddress; |
| | | |
| | | oCN.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " + |
| | | "(getdate(),'" + user + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','" + IPAddress + "','" + Operation + "')" |
| | | ); |
| | | |
| | | |
| | | oCN.Commit();//提交事务 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | |
| | | ,HLevel,HEndFlag,HStopflag,HRemark,HDeptID,HGroupID,HUseFlag,HMakeTime,HCREATEORGID,HUSEORGID |
| | | ) |
| | | values |
| | | ({jsonData.HItemID},{jsonData.HERPItemID},'{jsonData.HNumber}','{jsonData.HName}', |
| | | ({jsonData.HItemID},{jsonData.HItemID},'{jsonData.HNumber}','{jsonData.HName}', |
| | | '{jsonData.HShortNumber}',{jsonData.HParentID},{jsonData.HLevel},{jsonData.HEndFlag},{jsonData.HStopflag},'{jsonData.HRemark}',{jsonData.HDeptID},{jsonData.HGroupID},'{jsonData.HUseFlag}','{jsonData.HMakeTime}',{jsonData.HCREATEORGID},{jsonData.HUSEORGID})"; |
| | | |
| | | oCN.RunProc(sql); |