1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System;
- using System.Data.SqlClient;
- using System.Linq;
- using JLHHJSvr.BLL;
- using JLHHJSvr.Com;
- using JLHHJSvr.Com.Model;
- using JLHHJSvr.Helper;
- using JLHHJSvr.LJException;
- using LJLib.DAL.SQL;
- using LJLib.Net.SPI.Server;
- using LJLib.SQLEX;
- namespace JLHHJSvr.Excutor
- {
- internal sealed class UnLockTableExcutor : ExcutorBase<UnLockTableRequest, UnLockTableResponse>
- {
- protected override void ExcuteInternal(UnLockTableRequest request, object state, UnLockTableResponse rslt)
- {
- var tokendata = BllHelper.GetToken(request.token);
- using (var con = GlobalVar.ConnectionString.NewSqlConnection())
- using (var cmd = con.CreateCommand())
- {
- con.Open();
- using (cmd.Transaction = con.BeginTransaction())
- {
- try
- {
- LockHelper.UnLockBill(cmd, request.keyword, request.billid, tokendata.username,tokendata.empid == 0 ? (byte)1 : (byte)0);
- cmd.Transaction.Commit();
- }
- catch (Exception e)
- {
- cmd.Transaction?.Rollback();
- rslt.ErrMsg = e.Message;
- }
- }
- }
- }
- }
- }
|