public void CommitFileChanges(string serverSessionId, int countryId, int?folderId, Tuple <string, string> keys) { var client2 = ScanServiceClient.CreateProxy(Program.SCAN_URL); try { client2.CommitFileChanges(serverSessionId, countryId, folderId, Program.currentUser.CountryID, Program.currentUser.UserID, keys.Item1, keys.Item2); } finally { ((IDisposable)client2).Dispose(); } }
public void ValidateVoucherThrow(int countryId, bool ss, int retailerId, int voucherId, bool voucherMustExist) { var keys = Security.CreateInstance().GenerateSecurityKeys(); var client = ScanServiceClient.CreateProxy(Program.SCAN_URL); try { client.ValidateVoucher(countryId, ss, retailerId, voucherId, voucherMustExist, keys.Item1, keys.Item2); } finally { ((IDisposable)client).Dispose(); } }
public void SendFileAsync(FileInfo info, string serverSessionId, Tuple <string, string> keys) { var client = ScanServiceClient.CreateProxy(Program.SCAN_URL); try { var name = info.Name.ToUniqueFileName(); info.SlimCopyAsync((data, pos, read) => { client.SaveDataAsync(serverSessionId, name, data.Copy(read), pos, keys.Item1, keys.Item2); }); } finally { ((IDisposable)client).Dispose(); } }
public string ReadCoverInfo(int id) { var client = ScanServiceClient.CreateProxy(Program.SCAN_URL); try { var keys = Security.CreateInstance().GenerateSecurityKeys(); return(client.ReadCoverInfo(id, keys.Item1, keys.Item2)); } finally { ((IDisposable)client).Dispose(); } }
public void DeleteAllFilesInFolder(int folderId) { IScanService client = null; try { client = ScanServiceClient.CreateProxy(Program.SCAN_URL); var keys = Security.CreateInstance().GenerateSecurityKeys(); client.DeleteAllFilesInFolder(folderId, keys.Item1, keys.Item2); } finally { ((IDisposable)client).DisposeSf(); } }
public void DeleteFile(int id, bool isVoucher) { IScanService client = null; try { client = ScanServiceClient.CreateProxy(Program.SCAN_URL); var keys = Security.CreateInstance().GenerateSecurityKeys(); client.DeleteFile(id, isVoucher, keys.Item1, keys.Item2); } finally { ((IDisposable)client).DisposeSf(); } }
public void AddFolder(int?parentId, string name) { IScanService client = null; try { client = ScanServiceClient.CreateProxy(Program.SCAN_URL); var keys = Security.CreateInstance().GenerateSecurityKeys(); client.AddFolder(parentId, name, Program.currentUser.CountryID, Program.currentUser.UserID, keys.Item1, keys.Item2); } finally { ((IDisposable)client).DisposeSf(); } }
public void UpdateVouchersOrFilesBySql(string setSql, string whereCause, bool isVoucher) { IScanService client = null; try { client = ScanServiceClient.CreateProxy(Program.SCAN_URL); var keys = Security.CreateInstance().GenerateSecurityKeys(); client.UpdateVouchersOrFilesBySql(setSql, whereCause, isVoucher, keys.Item1, keys.Item2); } finally { ((IDisposable)client).DisposeSf(); } }
public List <VoucherInfo> SelectVouchersByRetailer(int countryId, int retailerId) { IScanService client = null; try { var keys = Security.CreateInstance().GenerateSecurityKeys(); client = ScanServiceClient.CreateProxy(); return(new List <VoucherInfo>(client.ReadData(countryId, retailerId, keys.Item1, keys.Item2))); } finally { ((IDisposable)client).DisposeSf(); } }
public void RenameFolder(int id, string name) { IScanService client = null; try { client = ScanServiceClient.CreateProxy(Program.SCAN_URL); var keys = Security.CreateInstance().GenerateSecurityKeys(); client.RenameFolder(id, name, keys.Item1, keys.Item2); } finally { ((IDisposable)client).DisposeSf(); } }
public UpdateFileInfo[] GetVersionInfo(string currentVersion) { var client = ScanServiceClient.CreateProxy(Program.SCAN_URL); try { var keys = Security.CreateInstance().GenerateSecurityKeys(); var results = client.GetVersionInfo(currentVersion, keys.Item1, keys.Item2); return(results); } finally { ((IDisposable)client).Dispose(); } }
public void CommitVoucherChanges(string serverSessionId, int jobId, int countryId, int retailerId, int voucherId, int?folderId, string siteCode, string barCode, int typeId, Tuple <string, string> keys) { var client2 = ScanServiceClient.CreateProxy(Program.SCAN_URL); try { client2.CommitVoucherChangesModify_V2(serverSessionId, jobId, countryId, retailerId, voucherId, folderId, siteCode, barCode, Program.currentUser.CountryID, Program.currentUser.UserID, typeId, ChangeContentType.INIT, keys.Item1, keys.Item2); } finally { ((IDisposable)client2).Dispose(); } }
public string FindVoucher(int countryId, int voucherId, int voucherIdCD) { var client = ScanServiceClient.CreateProxy(Program.SCAN_URL); try { var keys = Security.CreateInstance().GenerateSecurityKeys(); var result = client.FindVoucher(countryId, voucherId, voucherIdCD, keys.Item1, keys.Item2); return(result); } finally { ((IDisposable)client).Dispose(); } }
public VoucherInfo3 FindVoucherPRBySiteCode(string siteCode, int location) { var client = ScanServiceClient.CreateProxy(Program.SCAN_URL); try { var keys = Security.CreateInstance().GenerateSecurityKeys(); var result = client.FindVoucherPRBySiteCode(siteCode, location, keys.Item1, keys.Item2); return(result); } finally { ((IDisposable)client).Dispose(); } }
public byte[] ReadVersionFile(string fileName, long from) { var client = ScanServiceClient.CreateProxy(Program.SCAN_URL); try { var keys = Security.CreateInstance().GenerateSecurityKeys(); var buffer = client.ReadVersionFile(fileName, from, keys.Item1, keys.Item2); return(buffer); } finally { ((IDisposable)client).Dispose(); } }
public TransferFileInfo[] GetTransferFile(int countryId, int beginNumber, int endNumber, string siteCode) { IScanService client = null; try { client = ScanServiceClient.CreateProxy(Program.SCAN_URL); var keys = Security.CreateInstance().GenerateSecurityKeys(); return(client.GetTransferFile(countryId, beginNumber, endNumber, siteCode, keys.Item1, keys.Item2)); } finally { ((IDisposable)client).DisposeSf(); } }
public void EmailNotaDebito(List <EmailInfo> emailInfo) { IScanService client = null; try { var keys = Security.CreateInstance().GenerateSecurityKeys(); client = ScanServiceClient.CreateProxy(); client.EmailNotaDebito(emailInfo.ToArray(), keys.Item1, keys.Item2); } finally { ((IDisposable)client).DisposeSf(); } }
public FolderInfo[] ReadFolderList(int?parentId, int countryId) { IScanService client = null; try { client = ScanServiceClient.CreateProxy(Program.SCAN_URL); var keys = Security.CreateInstance().GenerateSecurityKeys(); var list = client.SelectFoldersByParent(parentId, countryId, keys.Item1, keys.Item2); return(list); } finally { ((IDisposable)client).DisposeSf(); } }
public void SaveHistory(OperationHistory operationType, Guid operationId, int brIsoId, int brId, int vId, int v2Id, int count, string details, Tuple <string, string> keys) { IScanService client = null; try { client = ScanServiceClient.CreateProxy(Program.SCAN_URL); client.SaveHistory(Program.currentUser.CountryID, Program.currentUser.UserID, operationType, operationId, brIsoId, brId, vId, v2Id, count, details, keys.Item1, keys.Item2); } finally { ((IDisposable)client).DisposeSf(); } }
public file2Info[] ReadCoverList(int folderId) { IScanService client = null; try { client = ScanServiceClient.CreateProxy(Program.SCAN_URL); var keys = Security.CreateInstance().GenerateSecurityKeys(); var list = client.SelectCoversByFolder(folderId, keys.Item1, keys.Item2); return(list); } finally { ((IDisposable)client).DisposeSf(); } }
public fileInfo[] ReadFileList(int folderId, int from) { IScanService client = null; try { client = ScanServiceClient.CreateProxy(Program.SCAN_URL); var keys = Security.CreateInstance().GenerateSecurityKeys(); var list = client.SelectFilesByFolder2(folderId, from, Program.ITEMS_SHOWN, keys.Item1, keys.Item2); return(list); } finally { ((IDisposable)client).DisposeSf(); } }
public fileInfo[] SelectFilesBySql(string whereCause) { IScanService client = null; try { client = ScanServiceClient.CreateProxy(Program.SCAN_URL); var keys = Security.CreateInstance().GenerateSecurityKeys(); var list = client.SelectFilesBySql(whereCause, keys.Item1, keys.Item2); return(list); } finally { ((IDisposable)client).DisposeSf(); } }
public fileInfo[] SelectVouchersByNumber(int countryId, int voucherId) { IScanService client = null; try { var keys = Security.CreateInstance().GenerateSecurityKeys(); client = ScanServiceClient.CreateProxy(); string where = string.Format("[iso_id] = {0} and [v_number] = {1}", countryId, voucherId); return(client.SelectFilesBySql(where, keys.Item1, keys.Item2)); } finally { ((IDisposable)client).DisposeSf(); } }
protected async override Task RunTest() { DeviceModel device = new DeviceModel() { Id = 1 }; var scanModels = m_scanGenerator.Run(device, m_wifiDevices, m_bluetoothDevices); Console.WriteLine("Scan Models {0}", scanModels.Count); var batchModels = ScanServiceClient.CreateScanBatchModels(scanModels, 5); ServiceEndpointLoad <ScanBatchModel> load = new ServiceEndpointLoad <ScanBatchModel>("Cluster Data", batchModels, SB => m_scanServiceClient.InsertScanBatchAsync(SB)); await load.Run(); }
public HistoryByCountryInfo[] ReadHistory(OperationHistory data, DateTime fromTime, DateTime toTime) { IScanService client = null; try { client = ScanServiceClient.CreateProxy(Program.SCAN_URL); var keys = Security.CreateInstance().GenerateSecurityKeys(); var list = client.ReadHistory(Program.currentUser.CountryID, Program.currentUser.UserID, data, fromTime, toTime, keys.Item1, keys.Item2); return(list); } finally { ((IDisposable)client).DisposeSf(); } }
private void OnReadVoucherInfoCompleted(object sender, ReadVoucherInfoCompletedEventArgs e) { try { AsyncManager.Parameters["info"] = e.Result; } catch (Exception ex) { ViewData[MESSAGE] = ex.InnerException.Message; } finally { ScanServiceClient proxy = (ScanServiceClient)sender; proxy.ReadVoucherInfoCompleted -= OnReadVoucherInfoCompleted; AsyncManager.OutstandingOperations.Decrement(); } }
public void ShowAsync(int Id) { string webRootPath = Server.MapPath("~/WEBVOUCHERFOLDER"); AsyncManager.OutstandingOperations.Increment(); AsyncManager.Timeout = ASINCH_TIMEOUT; var tcpBinding = ScanServiceClient.GetBinding(); var endpointAddress = ScanServiceClient.GetEnpoint(); ScanServiceClient proxy = new ScanServiceClient(tcpBinding, endpointAddress); proxy.ReadVoucherInfoCompleted += OnReadVoucherInfoCompleted; var keys = Security.CreateInstance().GenerateSecurityKeys(); proxy.ReadVoucherInfoAsync(Id, webRootPath, keys.Item1, keys.Item2); }
/// <summary> /// /// </summary> /// <param name="countryId"></param> /// <param name="officeId"></param> /// <param name="date"></param> /// <param name="invoiceNumber"></param> /// <param name="format">ATOM, HTML4.0, MHTML, IMAGE, EXCEL, WORD, CSV, PDF, XML</param> /// <param name="outputFormat">&OutputFormat=JPEG&</param> /// <returns></returns> /// <remarks>http://msdn.microsoft.com/en-us/library/ms152835.aspx</remarks> /// <remarks>http://msdn.microsoft.com/en-us/library/hh231593.aspx</remarks> public byte[] DownloadNotaDebitoReport(int countryId, int officeId, DateTime date, int invoiceNumber, string format = "PDF", string moreOptions = "") { //02/12/2013 string uri = string.Format("http://192.168.53.144/Reportserver/Pages/ReportViewer.aspx?%2fNota+Debito%2fNota+Debito+0032&rs:Command=Render&rs:format={4}{5}&iso_id={0}&Office={1}&in_date={2:dd/MM/yyyy}&invoicenumber={3}", countryId, officeId, date, invoiceNumber, format, moreOptions); IScanService client = null; try { var keys = Security.CreateInstance().GenerateSecurityKeys(); client = ScanServiceClient.CreateProxy(); byte[] data = client.DownloadReport(uri, keys.Item1, keys.Item2); return(data); } finally { ((IDisposable)client).DisposeSf(); } }
public void LogOperation(OperationHistory operation, Guid session, int countryId, int branchId, int voucherId, int voucher2Id = 0, int count = 0, string message = null) { #if SCANNING IScanService client = null; try { client = ScanServiceClient.CreateProxy(Program.SCAN_IP); var keys = Security.CreateInstance().GenerateSecurityKeys(); client.SaveHistory(Program.currentUser.CountryID, Program.currentUser.UserID, operation, session, countryId, branchId, voucherId, voucher2Id, count, message, keys.Item1, keys.Item2); } finally { ((IDisposable)client).DisposeSf(); } #endif }
private static void RunLoadtestSimulation() { var serviceProvider = new ServiceCollection().AddHttpClient().BuildServiceProvider(); var httpClientFactory = serviceProvider.GetService <IHttpClientFactory>(); /// Creating clients IDeviceServiceClient deviceServiceClient = new DeviceServiceClient(httpClientFactory); IScanServiceClient scanServiceClient = new ScanServiceClient(httpClientFactory); ISettingServiceClient settingServiceClient = new SettingServiceClient(httpClientFactory); // Read in test data IList <DeviceModel> TestDevices = FileParser.ReadTestDevices(); IList <ScanBatchModel> scanBatchModels = ScanServiceClient.CreateScanBatchModels(FileParser.ReadScanModel().GetRange(0, 10000), 5).ToList(); DeviceModel device = new DeviceModel() { Id = 1 }; var wifiBleDevices = FileParser.ReadClusterDevices(); IClusterGraphScanGenerator scanGenerator = new ClusterGraphScanGenerator(); scanGenerator.Run(device, wifiBleDevices.Item1, wifiBleDevices.Item2); ISimulation <SimulationResult> loadTestSimulation = new LoadTestSimulation( deviceServiceClient, settingServiceClient, scanServiceClient, TestDevices, scanBatchModels); ISimulation <SimulationResult> clusterInsertSimulation = new ClusterInsertSimulation( deviceServiceClient, settingServiceClient, scanServiceClient, scanGenerator, wifiBleDevices.Item1, wifiBleDevices.Item2); loadTestSimulation.Run(); }