Пример #1
0
 public override void Excute(PosStoreServer server, PosStoreSession session, PosStoreRequestInfo requestInfo)
 {
     try
     {
         var   datas         = requestInfo.Read <PaySnDto>();
         PaySn customOrderSn = new PaySn(datas.CompanyId, datas.StoreId, datas.MachineSn);
         if (customOrderSn.GetNumber() <= datas.Number)
         {
             customOrderSn.ResetSerialNumber(datas.Number);
         }
         else
         {
             session.SendObject(this.CmdCode, new PaySnDto()
             {
                 CompanyId = customOrderSn.CompanyId, MachineSn = customOrderSn.MachineSn, StoreId = customOrderSn.StoreId, Name = customOrderSn.Name, Number = customOrderSn.GetNumber(), SwiftNumberMode = customOrderSn.SwiftNumberMode
             });
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Пример #2
0
 public override void Excute(PosStoreServer server, PosStoreSession session, PosStoreRequestInfo requestInfo)
 {
     try
     {
         var      datas    = requestInfo.Read <MemberNoDto>();
         MemberNo memberNo = new MemberNo(datas.CompanyId, datas.StoreId);
         if (memberNo.GetNumber() <= datas.Number)
         {
             memberNo.Reset(datas.Number);
         }
         else
         {
             session.SendObject(this.CmdCode, new MemberNoDto()
             {
                 CompanyId = memberNo.CompanyId, StoreId = memberNo.StoreId, Name = memberNo.Name, Number = memberNo.GetNumber(), SwiftNumberMode = memberNo.SwiftNumberMode
             });
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }