Ejemplo n.º 1
0
 public void fillParameterBoxes()
 {
     this.txbServiceName.Text      = ServerParameterService.getServerDenomination();
     this.txbServiceURL.Text       = ServerParameterService.getServerEndPoint();
     this.txbServicePath.Text      = ServerParameterService.getServerPath();
     this.txtProhibitedMargin.Text = ServerParameterService.getProhibitedFactor();
     this.txtMaxLineCount.Text     = ServerParameterService.getMaxPrintLines();
 }
Ejemplo n.º 2
0
        public static string getRootServiceApiURL()
        {
            string url             = "";
            string serviceRootPath = ServerParameterService.getServerParameterValue(ParameterConstants.SERVICE_PATH_PARAM_NAME);
            string endPointPath    = getServiceApiEndPoint() + serviceRootPath.Trim();

            url = endPointPath == "" ? DEFAULT_ROOT_SERVICE_API_END_POINT : endPointPath;
            return(url);
        }
Ejemplo n.º 3
0
        public static string getServiceApiEndPoint()
        {
            string url             = "";
            string serviceEndPoint = ServerParameterService.getServerParameterValue(ParameterConstants.SERVICE_ENDPOINT_PARAM_NAME);
            string endPoint        = serviceEndPoint.Trim();

            url = endPoint == "" ? DEFAULT_ROOT_SERVICE_API_END_POINT : endPoint;
            return(url);
        }
Ejemplo n.º 4
0
 public void loadControls()
 {
     // TODO: Encapsular con Delegados para ThreadSafe
     this.drawTypeBox.ValueMember   = GeneralConstants.DISPLAY_DRAWTYPE_KEY_LABEL;
     this.drawTypeBox.DisplayMember = GeneralConstants.DISPLAY_DRAWTYPE_VALUE_LABEL;
     this.drawTypeBox.DataSource    = UtilityService.drawTypeDataTable(this.drawTypeBox.ValueMember, this.drawTypeBox.DisplayMember);
     this.drawTypeBox.SelectedIndex = 0;
     // Establecer propiedades de máximo a recibir
     txbMaxToReceive.BackColor     = Color.White;
     txbMaxToReceive.ForeColor     = Color.Red;
     txbMaxToReceive.ReadOnly      = true;
     this.txbProhibitedMargin.Text = "Máximo:  " + ServerParameterService.getProhibitedFactor() + " %";
 }
Ejemplo n.º 5
0
        private void listView_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
        {
            int rowLimit = Int32.Parse(ServerParameterService.getMaxPrintLines());
            int rowCount = this.listView.Rows.Count - 1;

            if (rowCount >= rowLimit)
            {
                if (e.RowIndex >= rowLimit)
                {
                    SendKeys.Send("{ESC}");
                    SendKeys.Send("{TAB}");
                    //Console.WriteLine("Prueba: " + e.RowIndex);
                }
            }
        }
Ejemplo n.º 6
0
 private void updateTotalBoxes(long pGroupId)
 {
     if (pGroupId != 0)
     {
         int         totalImport   = 0;
         int         syncImport    = 0;
         int         qrImport      = 0;
         int         pendingImport = 0;
         ListService listService   = new ListService();
         // Calcular importe sincronizado con el server
         int[] syncTotalImportArray = listService.getDrawTotals(this.datePickerList.Value.Date, pGroupId);
         for (int i = 0; i < syncTotalImportArray.Length; i++)
         {
             totalImport += syncTotalImportArray[i];
         }
         this.setTotalImport(FormatService.formatInt(totalImport));
         // Calcular importe pendiente de sincronización
         //int[] pendingSyncImportArray = listService.getDrawPendingSyncTotals(this.datePickerList.Value.Date, pGroupId);
         int[] pendingSyncImportArray = listService.getTotalImportBySyncStatus(this.datePickerList.Value.Date, pGroupId, SystemConstants.SYNC_STATUS_PENDING_TO_SERVER);
         for (int i = 0; i < pendingSyncImportArray.Length; i++)
         {
             pendingImport += pendingSyncImportArray[i];
         }
         // Calcular importe sincronizado vía web
         int[] syncImportArray = listService.getTotalImportBySyncStatus(this.datePickerList.Value.Date, pGroupId, SystemConstants.SYNC_STATUS_COMPLETED);
         for (int i = 0; i < syncImportArray.Length; i++)
         {
             syncImport += syncImportArray[i];
         }
         // Calcular importe sincronizado vía Código QR
         int[] qrSyncImportArray = listService.getTotalImportBySyncStatus(this.datePickerList.Value.Date, pGroupId, SystemConstants.SYNC_STATUS_QRUPDATED);
         for (int i = 0; i < qrSyncImportArray.Length; i++)
         {
             qrImport += qrSyncImportArray[i];
         }
         // Setear los controles
         //this.setSyncImport(FormatService.formatInt(totalImport - pendingImport));
         this.setSyncImport(FormatService.formatInt(syncImport));
         this.setSyncQRImport(FormatService.formatInt(qrImport));
         this.setPendingImport(FormatService.formatInt(pendingImport));
         int prohibitedFactor = Int32.Parse(ServerParameterService.getProhibitedFactor());
         int maxToReceive     = (int)(totalImport * ((double)prohibitedFactor / 100));
         this.setMaxToReceive(maxToReceive == 0 ? "" : FormatService.formatInt(maxToReceive) + " ");
     }
 }