public void SyncServerTime()
 {
     using (CommonServiceClient client = SoapClientFactory.CreateCommonServiceClient())
     {
         client.SyncServerTime();
     }
 }
 public string GetDataSN(string dataCode, bool asHeader)
 {
     using (CommonServiceClient client = SoapClientFactory.CreateCommonServiceClient())
     {
         byte[] loginTicket = WebServiceSecurity.EncryptLoginer(Loginer.CurrentUser);
         return(client.GetDataSN(loginTicket, dataCode, asHeader));
     }
 }
 public bool RestoreDatabase(string BKFILE, string DBNAME)
 {
     using (CommonServiceClient client = SoapClientFactory.CreateCommonServiceClient())
     {
         byte[] loginTicket = WebServiceSecurity.EncryptLoginer(Loginer.CurrentUser);
         return(client.RestoreDatabase(BKFILE, DBNAME));
     }
 }
 public bool BackupDatabase(string DBNAME, string BKPATH)
 {
     using (CommonServiceClient client = SoapClientFactory.CreateCommonServiceClient())
     {
         byte[] loginTicket = WebServiceSecurity.EncryptLoginer(Loginer.CurrentUser);
         return(client.BackupDatabase(DBNAME, BKPATH));
     }
 }
Example #5
0
 public bool SaveFieldDef(DataTable data)
 {
     using (CommonServiceClient client = SoapClientFactory.CreateCommonServiceClient())
     {
         byte[] loginTicket = WebServiceSecurity.EncryptLoginer(Loginer.CurrentUser);
         byte[] bsData      = ZipTools.CompressionDataSet(dalBase.TableToDataSet(data));
         return(client.SaveFieldDef(loginTicket, bsData));
     }
 }
Example #6
0
 public string[] GetTracedFields(string tableName)
 {
     using (CommonServiceClient client = SoapClientFactory.CreateCommonServiceClient())
     {
         byte[]   loginTicket = WebServiceSecurity.EncryptLoginer(Loginer.CurrentUser);
         string[] arr         = client.GetTracedFields(loginTicket, tableName);
         return(arr);
     }
 }
Example #7
0
 public DataTable GetLogFieldDef(string tableName)
 {
     using (CommonServiceClient client = SoapClientFactory.CreateCommonServiceClient())
     {
         byte[] loginTicket  = WebServiceSecurity.EncryptLoginer(Loginer.CurrentUser);
         byte[] receivedData = client.GetLogFieldDef(loginTicket, tableName);
         return(ZipTools.DecompressionDataSet(receivedData).Tables[0]);
     }
 }
Example #8
0
 public DataSet SearchLog(string logUser, string tableName, DateTime dateFrom, DateTime dateTo)
 {
     using (CommonServiceClient client = SoapClientFactory.CreateCommonServiceClient())
     {
         byte[] loginTicket  = WebServiceSecurity.EncryptLoginer(Loginer.CurrentUser);
         byte[] receivedData = client.SearchLog(loginTicket, logUser, tableName, dateFrom, dateTo);
         return(ZipTools.DecompressionDataSet(receivedData));
     }
 }
 public System.Data.DataTable GetData(string docID)
 {
     using (CommonServiceClient client = SoapClientFactory.CreateCommonServiceClient())
     {
         byte[] loginTicket  = WebServiceSecurity.EncryptLoginer(Loginer.CurrentUser);
         byte[] receivedData = client.GetAttachedFiles(loginTicket, docID);
         return(ZipTools.DecompressionDataSet(receivedData).Tables[0]);
     }
 }
 public System.Data.DataTable GetSystemDataSet()
 {
     using (CommonServiceClient client = SoapClientFactory.CreateCommonServiceClient())
     {
         byte[] validationTicket = WebServiceSecurity.GetLoginTicket();
         byte[] receivedData     = client.GetSystemDataSet(validationTicket);
         return(ZipTools.DecompressionDataSet(receivedData).Tables[0]);
     }
 }
 public DataTable SearchOutstanding(string invoiceNo, string customer, DateTime dateFrom, DateTime dateTo, DateTime dateEnd, string outstandingType)
 {
     using (CommonServiceClient client = SoapClientFactory.CreateCommonServiceClient())
     {
         byte[] loginTicket = WebServiceSecurity.EncryptLoginer(Loginer.CurrentUser);
         byte[] bs          = client.SearchOutstanding(loginTicket, invoiceNo, customer, dateFrom, dateTo, dateEnd, outstandingType);
         return(ZipTools.DecompressionDataSet(bs).Tables[0]);
     }
 }
 public DataTable GetBackupHistory(int topList)
 {
     using (CommonServiceClient client = SoapClientFactory.CreateCommonServiceClient())
     {
         byte[] loginTicket = WebServiceSecurity.EncryptLoginer(Loginer.CurrentUser);
         byte[] bs          = client.GetBackupHistory(loginTicket, topList);
         return(ZipTools.DecompressionDataSet(bs).Tables[0]);
     }
 }
Example #13
0
        public void WriteLog(string logID, DataTable originalData, DataTable changes, string tableName, string keyFieldName, bool isMaster)
        {
            using (CommonServiceClient client = SoapClientFactory.CreateCommonServiceClient())
            {
                byte[] loginTicket = WebServiceSecurity.EncryptLoginer(Loginer.CurrentUser);
                byte[] bsOriginal  = ZipTools.CompressionDataSet(dalBase.TableToDataSet(originalData));
                byte[] bsChanges   = ZipTools.CompressionDataSet(dalBase.TableToDataSet(changes));

                client.WriteLog(loginTicket, logID, bsOriginal, bsChanges, tableName, keyFieldName, isMaster);
            }
        }
Example #14
0
 /// <summary>
 /// 测试WebService连接
 /// </summary>
 /// <returns></returns>
 private static bool TestWebServiceConnection()
 {
     try
     {
         CommonServiceClient commonService = SoapClientFactory.CreateCommonServiceClient();
         byte[] validationTicket           = WebServiceSecurity.GetLoginTicket();
         return(commonService.TestConnection(validationTicket));
     }
     catch (Exception ex)
     {
         Msg.ShowException(ex);
         return(false);
     }
 }