コード例 #1
0
        protected void UiVistaSku_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            switch (e.Parameters.Split('-')[0])
            {
            case "ActualizarDatos":
                FacturaEncabezado.CLIENT_ID             = UiListaCliente.Value.ToString();
                FacturaEncabezado.CDF_RESOLUCION        = UiListaResolucion.Value.ToString();
                FacturaEncabezado.CDF_SERIE             = UiListaResolucion.Text;
                FacturaEncabezado.VOID_DATETIME         = Convert.ToDateTime(UiFechaDocumento.Value);
                FacturaEncabezado.CLOSED_ROUTE_DATETIME = Convert.ToDateTime(UiFechaVencimiento.Value);
                FacturaEncabezado.CLEARING_DATETIME     = Convert.ToDateTime(UiFechaContable.Value);
                UsuarioDeseaActualizarFacturaPostPicking?.Invoke(sender, new FacturaArgumento {
                    Data = FacturaEncabezado
                });
                break;

            case "Imprimir":
                UsuarioDeseaImprimir?.Invoke(sender, new FacturaArgumento {
                    Data = FacturaEncabezado
                });
                break;

            case "Salir":
                DevExpress.Web.ASPxWebControl.RedirectOnCallback("PanleListingPicking.aspx");
                break;

            case "FinalizarFactura":
                //DevExpress.Web.ASPxWebControl.RedirectOnCallback("PanleListingPicking.aspx");
                FinalizarFactura();
                break;
            }
        }
        protected void gridResolution_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            if (Session["connectionString"] == null || Session["USER"] == null)
            {
                return;
            }
            switch (e.Parameters.Split('-')[0])
            {
            case "btnUpdate":
                SaveResolution(e.Parameters.Split('-')[1].Equals("0"));
                break;

            case "GetMaxSerie":
                GetMaxSerie();
                break;

            case "btnDelete":
                DeleteResolucion();
                break;

            case "btnQuitarRuta":
                gridLookpRuta.Text  = "";
                gridLookpRuta.Value = null;
                SaveResolution(e.Parameters.Split('-')[1].Equals("0"));
                break;
            }
        }
コード例 #3
0
        protected void gridListInvoice_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            if (e.Parameters != null)
            {
                string[] arrParam = e.Parameters.Split('|');
                if (arrParam[0] == "Process")
                {
                    //set value
                    string key           = arrParam[1];
                    object rownumber     = gridListInvoice.GetSelectedFieldValues("Invoice_ID");
                    string invoicenumber = gridListInvoice.GetRowValuesByKeyValue(key, "InvoiceNumber").ToString();

                    //execute data to database
                    ResponseQuery = DbTransaction.DbToString("dbo.sp_SubmitInvoicePertamina", new
                    {
                        Invoice_ID = key,
                        Invoice_No = invoicenumber,
                        userlogin  = UserProfile.Username
                    }, true);

                    //show notification
                    gridListInvoice.JSProperties["cpRes"] = ResponseQuery;
                }
            }
        }
コード例 #4
0
        protected void UiVistaEncuestaDeCompetencia_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            if (!ValidarConexionYUsuarioLogueado(sender))
            {
                return;
            }
            switch (e.Parameters.Split('|')[0])
            {
            case "ObtenerEncuestaDeCompetencia":

                if (UiFechaFinal.Date < UiFechaDeInicio.Date)
                {
                    UiVistaEncuestaDeCompetencia.JSProperties.Add("cpError", "La fecha final es mayor a fecha final");
                }
                else
                {
                    var consultaArgumento = new ConsultaArgumento
                    {
                        FechaInicial = UiFechaDeInicio.Date,
                        FechaFinal   = UiFechaFinal.Date,
                        Ruta         = ObtenerRutasSeleccionadas()
                    };
                    UsuarioDeseaObtenerEncuestaDeCompetencia?.Invoke(sender, consultaArgumento);
                }
                break;

            case "ExpandirGrupoVistaGeneral":
                UiVistaEncuestaDeCompetencia.ExpandAll();
                break;

            case "ContraerGrupoVistaGeneral":
                UiVistaEncuestaDeCompetencia.CollapseAll();
                break;
            }
        }
        protected void gvDetail_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            string categoryId = gvMaster.GetRowValues(gvMaster.FocusedRowIndex, "CategoryID").ToString();

            adsProducts.SelectParameters["CategoryID"].DefaultValue = categoryId;
            gvDetail.DataBind();
        }
        protected void UiVistaEncabezado_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            if (!ValidarConexionYUsuarioLogueado(sender))
            {
                return;
            }
            try
            {
                switch (e.Parameters.Split('|')[0])
                {
                case "ExpandirGrupoVistaGeneral":
                    UiVistaEncabezado.ExpandAll();
                    break;

                case "ContraerGrupoVistaGeneral":
                    UiVistaEncabezado.CollapseAll();
                    break;

                case "ObtenerEncabezados":
                    ObtenerEncabezado(sender);
                    break;

                case "ObteneMarcador":
                    ObtenerFacturaParaMarcador(sender, int.Parse(e.Parameters.Split('|')[1]));
                    break;
                }
            }
            catch (Exception ex)
            {
                EstablecerError(ex.Message, sender);
            }
        }
コード例 #7
0
 protected void GridView_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     if (e.Parameters == "Clone")
     {
         CloneKey = true;
     }
 }
        protected void UiVistaDetallesDeOrdenesDeVenta_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            if (!ValidarConexionYUsuarioLogueado(sender))
            {
                return;
            }
            switch (e.Parameters.Split('|')[0])
            {
            case "ObtenerDetallesDeOrdenesDeVenta":
                if (UiFechaIncio.Date > UiFechaFinal.Date)
                {
                    EstablecerError("La Fecha de inicio tiene que se mayor a la fecha final", sender);
                }
                else
                {
                    UsuarioDesesaObtenerDetallesDeOrdenesDeVenta?.Invoke(sender, new OrdenDeVentaArgumento {
                        OrdenDeVentaDetalle = new OrdenDeVentaDetalle {
                            STAR_DATE = UiFechaIncio.Date, END_DATE = UiFechaFinal.Date
                        }
                    });
                }
                break;

            case "ExpandirGrupoVistaGeneral":
                UiVistaDetallesDeOrdenesDeVenta.ExpandAll();
                break;

            case "ContraerGrupoVistaGeneral":
                UiVistaDetallesDeOrdenesDeVenta.CollapseAll();
                break;
            }
        }
コード例 #9
0
    protected void GridViewFacturasDetail_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
    {
        string SerieFactura = Convert.ToString(GridViewFacturas.GetSelectedFieldValues("SerieFactura").Select(c => c).FirstOrDefault());

        GridViewFacturasDetail.DataSource = FacturasRepository.GetFacturasDetail(SerieFactura);
        GridViewFacturasDetail.DataBind();
    }
        protected void UiVistaSecuenciaDocumentos_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            var secuenciaDocumento = new SecuenciaDeDocumento
            {
                DOC_TYPE       = UIListaTipoDocumento.Value.ToString(),
                SERIE          = UiTextoSerie.Text,
                BRANCH_NAME    = UiTextoNombre.Text,
                BRANCH_ADDRESS = UiTextoDireccion.Text,
                POST_DATETIME  = UiFecha.Date,
                DOC_FROM       = Int64.Parse(UiSpinRangoInicial.Text),
                DOC_TO         = Int64.Parse(UiSpinRangoFinal.Text),
                ASSIGNED_TO    = UiListaRuta.Value?.ToString() ?? "",
                ASSIGNED_BY    = Session["USER"].ToString(),
                CURRENT_DOC    = 1,
                STATUS         = "1"
            };

            switch (e.Parameters.Split('|')[0])
            {
            case "btnUpdate":
                secuenciaDocumento.ID_DOCUMENT_SECUENCE = int.Parse(e.Parameters.Split('|')[1]);

                if (secuenciaDocumento.ID_DOCUMENT_SECUENCE == 0)
                {
                    UsuarioDeseaInsertarSecuenciaDocumento?.Invoke(sender, new SecuenciaDocumentosArgumento {
                        Data = secuenciaDocumento
                    });
                }
                else
                {
                    UsuarioDeseaActualizarSecuenciaDocumento?.Invoke(sender, new SecuenciaDocumentosArgumento {
                        Data = secuenciaDocumento
                    });
                }
                break;

            case "btnDelete":
                secuenciaDocumento.ID_DOCUMENT_SECUENCE = int.Parse(e.Parameters.Split('|')[1]);
                UsuarioDeseaBorrarSecuenciaDocumento?.Invoke(sender, new SecuenciaDocumentosArgumento {
                    Data = secuenciaDocumento
                });
                break;

            case "GetMaxSerie":
                secuenciaDocumento.SERIE    = UiTextoSerie.Text;
                secuenciaDocumento.DOC_TYPE = UIListaTipoDocumento.Value.ToString();
                UsuarioDeseaObtenerMaximoSerie?.Invoke(sender, new SecuenciaDocumentosArgumento {
                    Data = secuenciaDocumento
                });
                break;

            case "btnQuitarRuta":
                secuenciaDocumento.ID_DOCUMENT_SECUENCE = int.Parse(e.Parameters.Split('|')[1]);
                secuenciaDocumento.ASSIGNED_TO          = "";
                UsuarioDeseaActualizarSecuenciaDocumento?.Invoke(sender, new SecuenciaDocumentosArgumento {
                    Data = secuenciaDocumento
                });
                break;
            }
        }
コード例 #11
0
        protected void PhotoGridView_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            int rowIndex = int.TryParse(e.Parameters, out int result) ? result : -1;

            Session["ads_id"] = AdvertGridView.GetRowValues(rowIndex, "ads_id");
            PhotoGridView.DataBind();
        }
コード例 #12
0
        protected void UiVistaMoneda_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            if (!ValidarConexionYUsuarioLogueado(sender))
            {
                return;
            }

            try
            {
                switch (e.Parameters.Split('|')[0])
                {
                case "GrabarMoneda":
                    var monedaGrabar = new Moneda
                    {
                        CURRENCY_ID = Convert.ToInt32(e.Parameters.Split('|')[1])
                        ,
                        CODE_CURRENCY = UiTextoCodigoMoneda.Text
                        ,
                        NAME_CURRENCY = UiTextoNombreMoneda.Text
                        ,
                        SYMBOL_CURRENCY = UiTextoSimboloMoneda.Text
                        ,
                        IS_DEFAULT = (UiCheckPredeterminado.Checked) ? 1 : 0
                    };

                    UsuarioDeseaGrabarMoneda?.Invoke(sender, new MonedaArgumento {
                        Moneda = monedaGrabar
                    });
                    break;

                case "EliminarMoneda":
                    var monedaEliminar = new Moneda
                    {
                        CURRENCY_ID = Convert.ToInt32(e.Parameters.Split('|')[1])
                    };

                    UsuarioDeseaBorrarMoneda?.Invoke(sender, new MonedaArgumento {
                        Moneda = monedaEliminar
                    });
                    break;

                case "ExpandirGrupoVistaGeneral":
                    UiVistaMoneda.ExpandAll();
                    break;

                case "ContraerGrupoVistaGeneral":
                    UiVistaMoneda.CollapseAll();
                    break;

                case "ObtenerMonedas":
                    UsuarioDeseaObtenerMonedas?.Invoke(sender, null);
                    break;
                }
            }
            catch (Exception ex)
            {
                EstablecerError(ex.Message, sender);
            }
        }
コード例 #13
0
 protected void GridViewSuppl_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     if (e.Parameters.StartsWith("d:"))
     {
         delete_suppl(e.Parameters.Substring(2));
         gridbind_suppl();
     }
 }
コード例 #14
0
 protected void ASPxGridView2_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     if (UiListaPedidosErp.Value != null)
     {
         Session["SAP_PICKING_DATA"] = null;
         GetSapData(UiListaPedidosErp.Value.ToString().Split('|')[0], UiListaPedidosErp.Value.ToString().Split('|')[1]);
     }
 }
コード例 #15
0
        protected void ConfigGridView_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            ListEditItem listItem = cmbQuestionnaireList.SelectedItem;

            txtQuestionnaireName.Text = listItem.Text;
            RefreshForm();
            ConfigGridView.DataBind();
            QuestionsGridView.DataBind();
        }
コード例 #16
0
        protected void ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            ASPxGridView grid               = (ASPxGridView)sender;
            ASPxSpinEdit unitPriceEditor    = (ASPxSpinEdit)grid.FindEditRowCellTemplateControl(((GridViewDataColumn)grid.Columns["UnitPrice"]), "UnitPriceEditor");
            ASPxSpinEdit unitsInStockEditor = (ASPxSpinEdit)grid.FindEditRowCellTemplateControl(((GridViewDataColumn)grid.Columns["UnitsInStock"]), "UnitsInStockEditor");
            ASPxTextBox  totalEditor        = (ASPxTextBox)grid.FindEditRowCellTemplateControl(((GridViewDataColumn)grid.Columns["Total"]), "TotalEditor");

            totalEditor.Value = Convert.ToDecimal(unitPriceEditor.Value) * Convert.ToDecimal(unitsInStockEditor.Value);
        }
コード例 #17
0
        protected void gvCalendarioPago_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            var parametros = e.Parameters.Split(',');

            if (parametros[0] == "buscar")
            {
                inicializacionGrillas(parametros);
            }
        }
コード例 #18
0
 protected void gridView_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     if ((string)Session["AppId"] == e.Parameters)
     {
         return;
     }
     Session["AppId"] = e.Parameters;
     gridView.DataBind();
 }
コード例 #19
0
 protected void grdRegionOrganization_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     if (grdRegion.FocusedRowIndex > -1)
     {
         Entity.DonVi        sysDV = (Entity.DonVi)grdRegion.GetRow(grdRegion.FocusedRowIndex);
         List <Entity.DonVi> lst   = _iSysDV.SYS_Region_Organization_SelectByIDIDRegion(sysDV.ID);
         grdRegionOrganization.DataSource = lst;
         grdRegionOrganization.DataBind();
     }
 }
コード例 #20
0
        protected void ActivPrefGridView_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            string DAGID = "";

            DAGID = e.Parameters.ToString();
            ActivPrefGridView.DataSource = VSWebBL.DashboardBL.ExchangeServerDetailsBL.Ins.GetDAGActivationPreference(DAGID);
            ActivPrefGridView.Columns.Clear();
            ActivPrefGridView.AutoGenerateColumns = true;
            ActivPrefGridView.KeyFieldName        = String.Empty;
            ActivPrefGridView.DataBind();
        }
コード例 #21
0
 protected void ASPxGridView2_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     ValidarConexionYUsuarioLogueado(new object());
     try
     {
         var datos = e.Parameters.ToString().Split('|');
         GetSkuByOrder(datos[0], datos[1], datos[2], datos[3]);
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
     }
 }
コード例 #22
0
        protected void gvBitacora_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            var parametros = e.Parameters.Split(',');

            if (parametros[0] == "buscar")
            {
                CargarBitacora(parametros);
            }
            if (parametros[0] == "excel")
            {
                DescargarExcel(parametros);
            }
        }
コード例 #23
0
 protected void ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     if (e.Parameters == "post")
     {
         for (int i = 0; i < list.Count; i++)
         {
             AccessDataSource1.UpdateParameters["CategoryName"].DefaultValue = list[i].CategoryName;
             AccessDataSource1.UpdateParameters["Description"].DefaultValue  = list[i].Description;
             AccessDataSource1.UpdateParameters["CategoryID"].DefaultValue   = list[i].Id.ToString();
             //AccessDataSource1.Update();  //Uncomment this line to update data!
         }
         ASPxGridView1.DataBind();
     }
 }
    protected void OrderDetailsGridView_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
    {
        if (e.Parameters == "MakeVisible")
        {
            ASPxGridView grid = (ASPxGridView)sender;

            object key          = GetKeyValue();
            int    visibleIndex = grid.FindVisibleIndexByKeyValue(key);

            grid.MakeRowVisible(key);
            grid.ScrollToVisibleIndexOnClient = visibleIndex;
            grid.FocusedRowIndex = visibleIndex;
        }
    }
コード例 #25
0
 protected void GridRK_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     if (e.Parameters.StartsWith("d:"))
     {
         string k = e.Parameters.Substring(2);
         if (k != "")
         {
             NameValueCollection Keys = new NameValueCollection();
             staticFramework.saveNVC(Keys, "reffnumber", reffnumber.Text);
             staticFramework.saveNVC(Keys, "category", "PRK");
             staticFramework.saveNVC(Keys, "seq", k);
             staticFramework.Delete(Keys, "appfincal_lending", conn);
             GridRK.JSProperties["cp_alert"] = "Please click save to update calculation";
         }
     }
 }
コード例 #26
0
        protected void DetailsGrid_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            if (NodesGrid.FocusedRowIndex == null || NodesGrid.FocusedRowIndex == -1)
            {
                return;
            }

            string NodeName = NodesGrid.GetRowValues(NodesGrid.FocusedRowIndex, "Name").ToString();

            Div2.InnerHtml = NodeName + " - Services Status";
            DataTable dt = VSWebBL.SecurityBL.NodesBL.Ins.GetNodeServices(NodeName);

            Session["Servicesgrid"] = dt;
            servicesGrid.DataSource = dt;
            servicesGrid.DataBind();
        }
コード例 #27
0
    protected void ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
    {
        AccessDataSource1.UpdateParameters["EmployeeID"].DefaultValue = ASPxTextBoxEmployeeID.Value.ToString();
        AccessDataSource1.UpdateParameters["LastName"].DefaultValue   = ASPxTextBoxLastName.Value.ToString();
        AccessDataSource1.UpdateParameters["FirstName"].DefaultValue  = ASPxTextBoxFirstName.Value.ToString();
        AccessDataSource1.UpdateParameters["BirthDate"].DefaultValue  = Convert.ToDateTime(ASPxDateEditBirthDate.Value).ToShortDateString();

        //for example purpose only, because online editing is not supported
        throw new Exception("Editing in online example is not supported"); //remove this line when testing the project

        AccessDataSource1.Update();                                        //Uncomment this line

        ASPxGridView gridView = (ASPxGridView)sender;

        gridView.DataBind();
    }
コード例 #28
0
 protected void grid_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     try
     {
         int     intIndiceRow = Convert.ToInt32(e.Parameters);
         DataRow dtr          = grid.GetDataRow(intIndiceRow);
         //Session[Constantes.SesionCodigoEmpleado] = dtr[Constantes.ColumnaEmpleadoUserId].ToString();
         Session[Constantes.SesionUserIdEmpleado] = dtr[Constantes.ColumnaEmpleadoUserId].ToString();
         ASPxWebControl.RedirectOnCallback("~/datosempleado");
         //Response.Redirect("~/datosempleado", false);
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #29
0
        /// <summary>
        /// Custom Calback del grid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void UiVistaCanal_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            Canal canal = new Canal
            {
                CHANNEL_ID          = Convert.ToInt32(UiTextoNumero.Text),
                CODE_CHANNEL        = UiTextoCodigo.Text,
                DESCRIPTION_CHANNEL = UiTextoDescripcion.Text,
                NAME_CHANNEL        = UiTextoNombre.Text,
                TYPE_CHANNEL        = UiListaTipoCanal.SelectedItem.Text,
                LAST_UPDATE_BY      = Session["LOGIN"].ToString()
            };

            switch (e.Parameters.Split('|')[0])
            {
            case "NEW":
                UsuarioDeseaGrabarCanal?.Invoke(sender, new CanalArgumento {
                    Data = canal
                });
                break;

            case "UPDATE":
                UsuarioDeseaGrabarCanal?.Invoke(sender, new CanalArgumento {
                    Data = canal
                });
                break;

            case "DELETE":
                UsuarioDeseaBorrarCanal?.Invoke(sender, new CanalArgumento {
                    Data = canal
                });
                break;

            case "ExpandirGrupoVistaGeneral":
                UiVistaCanal.ExpandAll();
                break;

            case "ContraerGrupoVistaGeneral":
                UiVistaCanal.CollapseAll();
                break;

            case "ObtenerAcuerdosComerciales":
                UsuarioDeseaObtenerCanales?.Invoke(sender, new CanalArgumento {
                    Data = new Canal()
                });
                break;
            }
        }
コード例 #30
0
 protected void ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     try
     {
         if (e.Parameters.Contains("CARGA_DATOS"))
         {
             string[]      datos  = e.Parameters.Split('|');
             var           codigo = int.Parse(datos[1]);
             SCPV_Perfiles perfil = this.listadoPerfiles.Where(x => x.ID == codigo).FirstOrDefault();
             this.ASPxGridView1.JSProperties["cpPerfil"] = new JavaScriptSerializer().Serialize(perfil);
         }
     }
     catch (Exception ex)
     {
         // funcionControlErrores(ex.Message + " -TRACE: " + ex.StackTrace);
     }
 }