Esempio n. 1
0
 protected void gridView_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     if (e.Parameters == "databind")
     {
         gridView.DataBind();
     }
 }
Esempio n. 2
0
 protected void UiVistaTareasSinGestion_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     if (!ValidarConexionYUsuarioLogueado(sender))
     {
         return;
     }
     switch (e.Parameters.Split('|')[0])
     {
     case "ObtenerTareasSinGestion":
         var tarea = new Tarea();
         tarea.START_DATE = DateTime.Parse(UiFechaInicio.Value.ToString());
         tarea.END_DATE   = DateTime.Parse(UiFechaFinal.Value.ToString());
         if (tarea.START_DATE > tarea.END_DATE)
         {
             UiVistaTareasSinGestion.JSProperties.Add("cpError", "La fecha inicio es mayor a la fecha final");
         }
         else
         {
             UsuarioDeseaObtenerTareasSinGestion?.Invoke(sender, new  TareaArgumento {
                 Data = tarea
             });
         }
         break;
     }
 }
Esempio n. 3
0
        protected void UiVistaReubicacion_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            if (!ValidarConexionYUsuarioLogueado(sender))
            {
                return;
            }
            switch (e.Parameters.Split('-')[0])
            {
            case "ObtenerReporte":
                Inventario inventario = new Inventario();
                inventario.START_DATE = DateTime.Parse(UiFechaInicio.Value.ToString());
                inventario.END_DATE   = DateTime.Parse(UiFechaFinal.Value.ToString());

                if (inventario.START_DATE > inventario.END_DATE)
                {
                    UiVistaReubicacion.JSProperties.Add("cpError", "La fecha inicio es mayor a la fecha final");
                }
                else
                {
                    UsuarioDesesaObtenerReporte?.Invoke(sender, new InventarioArgumento {
                        Data = inventario
                    });
                }
                break;
            }
        }
Esempio n. 4
0
        protected void MUserInRolesGridView_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            string userId = string.Empty;
            string role   = string.Empty;
            string roleId = string.Empty;

            if (e.Parameters.Equals("add"))
            {
                List <Object> userSelectedValues = MUsersGridView.GetSelectedFieldValues("Id");
                List <Object> roleSelectedValues = MRolesGridView.GetSelectedFieldValues("Name");
                if ((userSelectedValues != null && userSelectedValues.Count > 0) && (roleSelectedValues != null && roleSelectedValues.Count > 0))
                {
                    var manager = Context.GetOwinContext().GetUserManager <ApplicationUserManager>();
                    userId            = userSelectedValues[0].ToString();
                    Session["UserId"] = userId;
                    foreach (var item in roleSelectedValues)
                    {
                        role = item.ToString();
                        if (!manager.IsInRole(userId, role))
                        {
                            IdentityResult result = manager.AddToRole(userId, role);
                            if (!result.Succeeded)
                            {
                                throw new Exception(result.Errors.FirstOrDefault());
                            }
                        }
                    }
                }
            }
            else if (e.Parameters.Equals("del"))
            {
                List <Object> userSelectedValues = MUsersGridView.GetSelectedFieldValues("Id");
                List <Object> roleSelectedValues = MUserInRolesGridView.GetSelectedFieldValues("RoleId");
                if ((userSelectedValues != null && userSelectedValues.Count > 0) && (roleSelectedValues != null && roleSelectedValues.Count > 0))
                {
                    userId            = userSelectedValues[0].ToString();
                    Session["UserId"] = userId;
                    var manager     = Context.GetOwinContext().GetUserManager <ApplicationUserManager>();
                    var roleManager = new RoleManager <IdentityRole>(new RoleStore <IdentityRole>(new ApplicationDbContext()));
                    foreach (var item in roleSelectedValues)
                    {
                        roleId = item.ToString();
                        role   = roleManager?.FindById(roleId)?.Name ?? string.Empty;
                        if (manager.IsInRole(userId, role))
                        {
                            IdentityResult result = manager.RemoveFromRole(userId, role);
                            if (!result.Succeeded)
                            {
                                throw new Exception(result.Errors.FirstOrDefault());
                            }
                        }
                    }
                }
            }
            else
            {
                Session["UserId"] = e.Parameters;
            }
            MUserInRolesGridView.DataBind();
        }
Esempio n. 5
0
 protected void grid_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     if (e.Parameters.StartsWith("e:"))
     {
         grid.JSProperties["cp_export"] = pivotgridExpoort(e.Parameters.Substring(2));
     }
 }
 protected void gridpending_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     try
     {
         if (e.Parameters.StartsWith("d:"))
         {
             USC_paraminput1.savepending(e.Parameters.Substring(2));
             USC_paraminput1.dtbindpending(gridpending);
             //gridpending.JSProperties["cp_alert"] = "data deleted moved to pending";
         }
         if (e.Parameters.StartsWith("dp:"))
         {
             USC_paraminput1.deletepending(e.Parameters.Substring(3));
             USC_paraminput1.dtbindpending(gridpending);
         }
     }
     catch (Exception ex)
     {
         string errmsg = ex.Message;
         if (errmsg.IndexOf("Last Query") > 0)
         {
             errmsg = errmsg.Substring(0, errmsg.IndexOf("Last Query"));
         }
         gridpending.JSProperties["cp_alert"] = errmsg;
     }
 }
Esempio n. 7
0
        protected void grvItem_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            string[] parameter = e.Parameters.Split(':');

            switch (parameter[0])
            {
            case ("ConfirmaDoc"):

                ConfirmaDoc();

                break;

            case ("ConfirmaItem"):

                ConfirmaItem();

                break;

            case ("DeletaItem"):

                if (parameter[1] != String.Empty)
                {
                    DeletaItem(Convert.ToInt32(parameter[1]));
                }

                break;
            }
        }
        protected void GridViewForms_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            Encuesta encuesta;

            switch (e.Parameters)
            {
            case "insertar":
                encuesta = new Encuesta {
                    NAME = TxtSurveyName.Text, DESCRIPTION = MemoSurveyDescription.Text, LAST_UPDATED_BY = Session["USER"].ToString()
                };
                UsuarioDeseaCrearEncuesta?.Invoke(GridViewForms, new EncuestaArgumento {
                    Data = encuesta
                });
                break;

            case "modificar":
                encuesta = new Encuesta {
                    SURVEY_ID = Convert.ToDecimal(TxtSurveyID.Text), NAME = TxtSurveyName.Text, DESCRIPTION = MemoSurveyDescription.Text, LAST_UPDATED_BY = Session["USER"].ToString()
                };
                UsuarioDeseaModificarEncuesta?.Invoke(GridViewForms, new EncuestaArgumento {
                    Data = encuesta
                });
                break;

            case "eliminar":
                encuesta = new Encuesta {
                    SURVEY_ID = Convert.ToDecimal(TxtSurveyID.Text)
                };
                UsuarioDeseaEliminarEncuesta?.Invoke(GridViewForms, new EncuestaArgumento {
                    Data = encuesta
                });
                break;
            }
        }
Esempio n. 9
0
 protected void grid_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     string[] para = e.Parameters.Split(':');
     if (para[0] == "ADDNEW")
     {
         grid.JSProperties["cpNew"] = 1;
     }
 }
 protected void ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     if (!ValidarConexionYUsuarioLogueado(sender))
     {
         return;
     }
     GetMovement(ASPxDateEdit2.Date, ASPxDateEdit1.Date);
 }
 protected void grid_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     if (e.Parameters.StartsWith("d:"))
     {
         delete_data(e.Parameters.Substring(2));
         gridbind();
     }
 }
Esempio n. 12
0
 protected void grid_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     if (e.Parameters == "Update")
     {
         DoUpdateAndAddNewRow();
     }
     if (e.Parameters == "BatchUpdate")
     {
         DoBatchUpdate();
     }
 }
Esempio n. 13
0
 protected void gvVideoList_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     string[] s = e.Parameters.Split('|');
     switch (s[0])
     {
     case "DELETE":
         int id = Convert.ToInt32(s[1]);
         cDatabase.Deletevideo(id);
         gvVideoListDataBind();
         break;
     }
 }
Esempio n. 14
0
 protected void PublicationGridView_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     using (BalancesEntities db = new BalancesEntities())
     {
         var cat = Enumerable.FirstOrDefault(db.Category.Where(w => w.Name == e.Parameters));
         if (cat != null)
         {
             EntityDataSource1.WhereParameters["CategoryId"].DefaultValue = cat.Id.ToString();
             PublicationGridView.DataBind();
         }
     }
 }
Esempio n. 15
0
        // Callback
        protected void grvOrders_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            string[] parameter = e.Parameters.Split(':');

            switch (parameter[0])
            {
            case ("InvoiceNew"):

                InvoiceCreate(parameter[1]);

                break;
            }
        }
Esempio n. 16
0
    protected void grillaSubgrupo_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
    {
        if (e.Parameters != null)
        {
            string[] param = e.Parameters.Split('|');
            int      rol   = int.Parse(param[0]);
            int      grpId = int.Parse(param[1]);

            odsGrilla.SelectParameters[0].DefaultValue = grpId.ToString();
            odsGrilla.SelectParameters[1].DefaultValue = rol.ToString();
            odsGrilla.DataBind();
            grillaSubgrupo.DataBind();
        }
    }
Esempio n. 17
0
 protected void gridpending_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     if (e.Parameters.StartsWith("d:"))
     {
         USC_paraminput.savepending(e.Parameters.Substring(2));
         USC_paraminput.dtbindpending(gridpending);
         //gridpending.JSProperties["cp_alert"] = "data deleted moved to pending";
     }
     if (e.Parameters.StartsWith("dp:"))
     {
         USC_paraminput.deletepending(e.Parameters.Substring(3));
         USC_paraminput.dtbindpending(gridpending);
     }
 }
Esempio n. 18
0
    protected void ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
    {
        string[] param = e.Parameters.Split('|');
        if (param[0] != "D")
        {
            return;
        }
        BindGridView(ColumnIndex.Value, RowIndex.Value);
        ASPxGridView1.PageIndex = 0;

        if (e.Parameters == "D")
        {
            ASPxGridView1.JSProperties["cpShowDrillDownWindow"] = true;
        }
    }
        protected void AlertGrid_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            if (Session["connectionString"] == null || Session["USER"] == null)
            {
                AlertGrid.JSProperties.Add("cpLocation", "Enable");
                return;
            }
            switch (e.Parameters.Split('-')[0])
            {
            case "btnSave":
                SaveAlert(e.Parameters.Split('-')[1].Equals("0"));
                break;

            case "btnDelete":
                DeleteAlert();
                break;
            }
        }
    protected void gridView_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
    {
        isCancelRequired = false;
        int countOfOperations = 100;

        for (int i = 0; i < countOfOperations; i++)
        {
            progressInPercent = Math.Round((double)i / countOfOperations * 100);

            System.Threading.Thread.Sleep(150);
            //Do some step here
            if (isCancelRequired)
            {
                return;
            }
        }
        gridView.JSProperties["cp_isFinished"] = true;
    }
Esempio n. 21
0
 protected void grid_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     string[] para = e.Parameters.Split(':');
     if (para[0] == "NEW")
     {
     }
     else if (para[0] == "EDIT")
     {
         Edit(para[1]);
     }
     else if (para[0] == "VIEW")
     {
         View(para[1]);
     }
     else if (para[0] == "DELETE")
     {
     }
 }
        protected void gvConfig_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            try
            {
                if (Session["ConfigurationValues"] != null)
                {
                    listDataSource = (BindingList <Record>)Session["ConfigurationValues"];
                }
                else
                {
                    listDataSource = new BindingList <Record>();
                }
                Record newRecord  = new Record(cmbRiskType.Text, int.Parse(cmbRiskType.Value.ToString()), int.Parse(txtMinValue.Text), int.Parse(txtMaxValue.Text));
                bool   ConfigType = false;
                foreach (Record r in listDataSource)
                {
                    if (r.ConfigName.ToLower().Equals(cmbRiskType.Text.ToLower()))
                    {
                        ConfigType = true;
                        break;
                    }
                }

                if (!ConfigType)
                {
                    listDataSource.Add(newRecord);
                    Session["ConfigurationValues"] = listDataSource;
                }

                cmbRiskType.SelectedIndex = -1;
                cmbRiskType.Value         = null;
                txtMinValue.Value         = "";
                txtMaxValue.Value         = "";
                txtMinValue.Text          = "";
                txtMaxValue.Text          = "";
                gvConfig.DataBind();
            }
            catch (Exception ex)
            {
                CommonHelpers.writeLogToFile("gvConfig_CustomCallback: NewQuestionnaire.aspx", ex.Message);
            }
        }
    protected void grdListadoUsuarios_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
    {
        try
        {
            if (e.Parameters == "Grabar")
            {
                SearchUsuario          userGrabar = new SearchUsuario(this.ToString(), new HotelBooking.HotelBookingDataContext());
                SCPV_Usuario_Empleados user       = new SCPV_Usuario_Empleados();
                user.Usuario     = this.txtUsuario.Text;
                user.Password    = this.txtPassword.Text;
                user.Estado      = this.cmbEstado.Value.ToString();
                user.ID_Empleado = int.Parse(this.cmbEmpleado.Value.ToString());
                userGrabar.addUsuario(user);
                cargaInicialDatosUsuarios();
                this.grdListadoUsuarios.JSProperties["cpGrabar"] = "OK";
            }
            else if (e.Parameters == "Modificar")
            {
                SearchUsuario          userGrabar = new SearchUsuario(this.ToString(), new HotelBooking.HotelBookingDataContext());
                SCPV_Usuario_Empleados user       = new SCPV_Usuario_Empleados();
                user.Usuario  = this.txtUsuario.Text;
                user.Password = this.txtPassword.Text;
                user.Estado   = this.cmbEstado.Value.ToString();
                userGrabar.updateUsuario(user);
                cargaInicialDatosUsuarios();
                this.grdListadoUsuarios.JSProperties["cpModificar"] = "OK";
            }
        }
        catch (Exception)
        {
            if (e.Parameters == "Grabar")
            {
                this.grdListadoUsuarios.JSProperties["cpGrabar"] = "ERROR";
            }
            else if (e.Parameters == "Modificar")
            {
                this.grdListadoUsuarios.JSProperties["cpModificar"] = "ERROR";
            }

            throw;
        }
    }
Esempio n. 24
0
    protected void bootstrapGridView_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
    {
        bootstrapGridView.JSProperties["cpCallbackAction"] = e.Parameters;

        switch (e.Parameters)
        {
        case "FilterRow":
        {
            bootstrapGridView.Settings.ShowFilterRow = bootstrapGridView.Settings.ShowFilterRow ? false : true;
            bootstrapGridView.JSProperties["cpIsFilterRowVisible"] = bootstrapGridView.Settings.ShowFilterRow;
        }
        break;

        case "SearchPanel":
        {
            bootstrapGridView.SettingsSearchPanel.Visible            = bootstrapGridView.SettingsSearchPanel.Visible ? false : true;
            bootstrapGridView.JSProperties["cpIsSearchPanelVisible"] = bootstrapGridView.SettingsSearchPanel.Visible;
        }
        break;

        case "GroupPanel":
        {
            bootstrapGridView.Settings.ShowGroupPanel = bootstrapGridView.Settings.ShowGroupPanel ? false : true;
            bootstrapGridView.JSProperties["cpIsGroupPanelVisible"] = bootstrapGridView.Settings.ShowGroupPanel;
        }
        break;

        case "ID":
            SetColumnVisible("ID");
            break;

        case "Name":
            SetColumnVisible("Name");
            break;

        case "Type":
            SetColumnVisible("Type");
            break;
        }
    }
Esempio n. 25
0
        protected void grid_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            NameValueCollection nvcAuto      = new NameValueCollection();
            NameValueCollection nvcAutoField = new NameValueCollection();
            string stage = Request.QueryString["atype"];


            regno = grid.GetSelectedFieldValues("__KeyField");

            if (e.Parameters == "confirm")
            {
                try
                {
                    recalculate();
                }
                catch { }
                grid.JSProperties["cp_alert"]    = "Recalculate Success.";
                grid.JSProperties["cp_redirect"] = "BulkRecalculate.aspx?needFilter=1&passurl&mntitle=Bulk Recalculate&li=L|REC";
            }

            ListSys.gridBind(grid, (string)ViewState["strSQL"], UC_ListFilter1.paramFilter, UC_ListFilter1.strFilter, conn);
        }
Esempio n. 26
0
 protected void DAGStatusGridView_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
 }
 protected void gridpending_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
 }
        protected void GridViewPages_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            Pagina   pagina;
            Encuesta encuesta;

            switch (e.Parameters)
            {
            case "llenarGrid": var fieldValues = GridViewForms.GetSelectedFieldValues("SURVEY_ID", "NAME", "DESCRIPTION");
                foreach (object[] item in fieldValues)
                {
                    encuesta = new Encuesta {
                        SURVEY_ID = (decimal)item[0], NAME = item[1].ToString(), DESCRIPTION = item[2].ToString()
                    };
                    UsuarioSeleccionoEncuesta?.Invoke(this, new PaginaArgumento {
                        Encuesta = encuesta
                    });
                }
                break;

            case "insertar":
                if (ValidarUiOrder(-1))
                {
                    encuesta = new Encuesta {
                        SURVEY_ID = Convert.ToDecimal(CmbSurveyParent.Value)
                    };
                    pagina = new Pagina
                    {
                        NAME        = TxtPageName.Text,
                        DESCRIPTION = MemoPageDescription.Text,
                        SURVEY_ID   = Convert.ToDecimal(CmbSurveyParent.Value),
                        ORDER       = (short)SpinPageOrder.Number
                    };
                    UsuarioDeseaCrearPagina?.Invoke(GridViewPages,
                                                    new PaginaArgumento {
                        Data = pagina, Encuesta = encuesta
                    });
                }
                else
                {
                    EstablecerError("Ya existe el número de página", GridViewPages);
                }
                break;

            case "modificar":
                if (ValidarUiOrder(Convert.ToDecimal(TxtPageID.Text)))
                {
                    encuesta = new Encuesta {
                        SURVEY_ID = Convert.ToDecimal(CmbSurveyParent.Value)
                    };
                    pagina = new Pagina
                    {
                        NAME        = TxtPageName.Text,
                        DESCRIPTION = MemoPageDescription.Text,
                        PAGE_ID     = Convert.ToDecimal(TxtPageID.Text),
                        ORDER       = (short)SpinPageOrder.Number
                    };
                    UsuarioDeseaModificarPagina?.Invoke(GridViewPages,
                                                        new PaginaArgumento {
                        Data = pagina, Encuesta = encuesta
                    });
                }
                else
                {
                    EstablecerError("Ya existe el número de página", GridViewPages);
                }
                break;

            case "eliminar":
                encuesta = new Encuesta {
                    SURVEY_ID = Convert.ToDecimal(CmbSurveyParent.Value)
                };
                pagina = new Pagina {
                    PAGE_ID = Convert.ToDecimal(TxtPageID.Text)
                };
                UsuarioDeseaEliminarPagina?.Invoke(GridViewPages, new PaginaArgumento {
                    Data = pagina, Encuesta = encuesta
                });
                break;
            }
        }
Esempio n. 29
0
        protected void UiVistaPolignos_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
        {
            if (!ValidarConexionYUsuarioLogueado(sender))
            {
                return;
            }
            try
            {
                switch (e.Parameters.Split('|')[0])
                {
                case "ObtenerPuntos":
                    UiVistaPolignos.JSProperties.Add("cpFormarPoligonos", PoligonosTipoRegion);
                    break;

                case "CargarPoligonos":
                    UsuarioDeseaOptenerPoligonosTipoRegion?.Invoke(sender, new PoligonoArgumento {
                        Poligono = new Poligono {
                            POLYGON_TYPE = Enums.GetStringValue(TiposDePoligono.Region)
                        }
                    });
                    UsuarioDeseaObtenerPuntosDePoligono?.Invoke(sender, new PoligonoArgumento {
                        Poligono = new Poligono {
                            POLYGON_TYPE = Enums.GetStringValue(TiposDePoligono.Region)
                        }
                    });
                    UiVistaPolignos.JSProperties.Add("cpFormarPoligonos", PoligonosTipoRegion);
                    break;

                case "ObtenerPoligo":
                    var poligono = new Poligono();
                    foreach (var item in PoligonosTipoRegion.Where(item => item.POLYGON_ID == int.Parse(e.Parameters.Split('|')[1])))
                    {
                        poligono = item;
                        break;
                    }
                    UiVistaPolignos.JSProperties.Add("cpEstablecerPoligonoEncabezado", poligono);
                    break;

                case "GurdarPoligono":

                    var poligonoDibjugado = new Poligono
                    {
                        POLYGON_ID = int.Parse(UiPoligonoCodigo.Text)
                        ,
                        POLYGON_NAME = UiPoligonoNombre.Text
                        ,
                        POLYGON_DESCRIPTION = UiMemoDescripocion.Text
                        ,
                        COMMENT = UiMemoComentario.Text
                        ,
                        POLYGON_TYPE = Enums.GetStringValue(TiposDePoligono.Region)
                        ,
                        Puntos = new List <PoligonoPuntos>()
                        ,
                        LAST_UPDATE_BY = Session["LOGIN"].ToString()
                    };

                    var validarSiSoloSeActualiza = false;
                    if (poligonoDibjugado.POLYGON_ID != 0)
                    {
                        if (PoligonosTipoRegion.Any(poligonoExistente => poligonoDibjugado.POLYGON_ID == poligonoExistente.POLYGON_ID && poligonoExistente.HAS_CHILD == 1))
                        {
                            validarSiSoloSeActualiza = true;
                        }
                    }

                    if (!validarSiSoloSeActualiza)
                    {
                        var cordenadas = e.Parameters.Split('|')[2].Split('(');

                        for (int i = 0; i < cordenadas.Length; i++)
                        {
                            if (string.IsNullOrEmpty(cordenadas[i]))
                            {
                                continue;
                            }
                            var punto = cordenadas[i].Split(',');

                            var poligonoPunto = new PoligonoPuntos
                            {
                                POSITION = i
                                ,
                                LATITUDE = punto[0].Trim()
                                ,
                                LONGITUDE = punto[1].Replace(")", "").Trim()
                            };
                            poligonoDibjugado.Puntos.Add(poligonoPunto);
                        }
                        UsuarioDeseaGrabarPoligonoTipoRegion?.Invoke(sender, new PoligonoArgumento {
                            Poligono = poligonoDibjugado, ListaDeTareas = new List <string>()
                        });
                    }
                    else
                    {
                        UsuarioDeseaActualizarSoloEncabezdo?.Invoke(sender, new PoligonoArgumento {
                            Poligono = poligonoDibjugado
                        });
                    }

                    break;

                case "BorrarPoligono":
                    var poligonoBorrar = new Poligono
                    {
                        POLYGON_ID = int.Parse(UiPoligonoCodigo.Text)
                    };

                    UsuarioDeseaBorrarPoligonoTipoRegion?.Invoke(sender, new PoligonoArgumento {
                        Poligono = poligonoBorrar
                    });
                    break;
                }
            }
            catch (Exception ex)
            {
                EstablecerError(ex.Message, sender);
            }
        }
Esempio n. 30
0
 protected void grid_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
 {
     BindGridToData();
 }