protected void gridHangHoa_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     //    if (e.Exception is CustomExceptions.MyException)
     //    {
     //        e.ErrorText = e.Exception.Message;
     //    }
 }
 protected override void OnCustomErrorText_BaseImplementation(ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception != null && e.Exception.InnerException != null)
     {
         e.ErrorText = e.Exception.InnerException.Message;
     }
 }
Exemplo n.º 3
0
 protected void grid_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception.InnerException != null)
     {
         e.ErrorText += string.Format("{0}InnerException: '{1}'", Environment.NewLine, e.Exception.InnerException.Message);
     }
 }
Exemplo n.º 4
0
 protected void ASPxGridView1_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception is MyException)
     {
         e.ErrorText = e.Exception.Message;
     }
 }
 protected void ASPxGridView1_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception.GetType() == typeof(NotSupportedException))
     {
         e.ErrorText = "Online data modification is not supported. Download the example and implement your logic in the BatchUpdate event handler.";
     }
 }
 protected void gv_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception is CustomCallbackException)
     {
         e.ErrorText = e.Exception.Message;
     }
 }
Exemplo n.º 7
0
        protected void MUserInRolesGridView_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
        {
            e.ErrorText = e.Exception.Message;
            var lineNumber = new System.Diagnostics.StackTrace(e.Exception, true).GetFrame(0).GetFileLineNumber();

            AppUtils.AddErrorLog(e.Exception.HResult, e.Exception.Source, $"{e.Exception.Message} - {e.Exception.StackTrace}",
                                 Context.User.Identity.GetUserName(), out errorLogId, lineNumber, -1, -1);
        }
 protected void GvCuentaCorriente_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     //if (e.Exception is NullReferenceException)
     //    e.ErrorText = e.Exception.Message;
     //else if (e.Exception is NotSupportedException)
     //    e.ErrorText = e.Exception.Message;
     //else
     //    e.ErrorText = "Ha ocurrido un error";
 }
Exemplo n.º 9
0
 protected void gdvVendas_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception.InnerException != null)
     {
         if (e.Exception.InnerException.Message.StartsWith("The DELETE statement conflicted with the REFERENCE constraint"))
         {
             e.ErrorText = "Não é possível excluir uma venda com produtos cadastrados.";
         }
     }
 }
Exemplo n.º 10
0
 protected void gdvClientes_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception.InnerException != null)
     {
         if (e.Exception.InnerException.Message.StartsWith("The DELETE statement conflicted with the REFERENCE constraint"))
         {
             e.ErrorText = @"Não é possível excluir um cliente com saldo devedor na carteira.";
         }
     }
 }
Exemplo n.º 11
0
 protected void ASPxGridView1_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception != null)
     {
         if (Session["errorMessage"] != null)
         {
             e.ErrorText = Utilidades.validarExepcionSQL(Session["errorMessage"].ToString());
             Session["errorMessage"] = null;
         }
     }
 }
Exemplo n.º 12
0
 protected void ASPxgvTargets_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception.InnerException.ToString().Contains("PRIMARY KEY"))
     {
         e.ErrorText = "You entered Duplicate Data, Please re-enter Unique information.";
     }
     else
     {
         e.ErrorText = e.Exception.ToString();
     }
 }
        protected override string RaiseCustomErrorText(ASPxGridViewCustomErrorTextEventArgs e)
        {
            var processingResult = ErrorHelper.Process(e.Exception);

            if (processingResult != null)
            {
                return(processingResult);
            }

            OnCustomErrorText_BaseImplementation(e);

            return(base.RaiseCustomErrorText(e));
        }
 protected void grid_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception is NullReferenceException)
     {
         e.ErrorText = "NullReferenceExceptionText";
     }
     else if (e.Exception is InvalidOperationException)
     {
         e.ErrorText = "InvalidOperationExceptionText";
     }
     else if (e.Exception.Message.IndexOf("Cannot insert the value") != -1)
     {
         e.ErrorText = "Error al ingrear el REGISTRO, Seleccione 'Usuario' y 'Perfil' antes de GUARDAR... ";
     }
 }
 /// <summary>
 /// catch insert error and replace with meaningful descriptions
 /// could also over ride this and throw exception on row_inserting event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void dxgrdTarget_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception is NullReferenceException)
     {
         e.ErrorText = "Null Reference Exception" + e.Exception.Message.ToString();
     }
     else if (e.Exception is InvalidOperationException)
     {
         e.ErrorText = "Invalid Operation Exception" + e.Exception.Message.ToString();
     }
     else if (e.Exception is System.Reflection.TargetInvocationException && e.Exception.InnerException.ToString().Contains("duplicate key"))
     {
         e.ErrorText = "Not able to save record due to a duplicate company name";
     }
 }
Exemplo n.º 16
0
        //8/21/2015 NS added for VSPLUS-2087
        protected void ServersGridView_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
        {
            Exception ex = e.Exception;

            if (ex != null)
            {
                if (ex.Message.IndexOf("ErrCode!-1") != -1)
                {
                    e.ErrorText = ex.Message;
                }
                else if (ex.Message.IndexOf("ErrCode=-1") > 0)
                {
                    e.ErrorText = "some error";
                }
                else
                {
                    e.ErrorText = ex.Message;
                }
            }
        }
Exemplo n.º 17
0
        protected void UsersGridView_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
        {
            //6/9/2015 NS added for VSPLUS-1641
            Exception ex = e.Exception;

            if (ex != null)
            {
                if (ex.Message.IndexOf("ErrCode!-1") != -1)
                {
                    e.ErrorText = ex.Message;
                }
                else if (ex.Message.IndexOf("ErrCode=-1") > 0)
                {
                    e.ErrorText = "some error";
                }
                else
                {
                    e.ErrorText = ex.Message;
                }
            }
        }
Exemplo n.º 18
0
        protected void gvPenerimaanProposal_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
        {
            String error = gvPenerimaanProposal.JSProperties["cpMessage"].ToString();

            e.ErrorText = error;
        }
Exemplo n.º 19
0
 protected void gvAttachment_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     e.ErrorText = e.Exception.ToString();
 }
Exemplo n.º 20
0
 protected override void OnCustomErrorText_BaseImplementation(ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception != null && e.Exception.InnerException != null)
     {
         e.ErrorText = e.Exception.InnerException.Message;
     }
 }
Exemplo n.º 21
0
 protected void grdInputCommLine_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
 }
 protected void gdvNiveis_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception.Message.Contains("Duplicate"))
     {
         e.ErrorText = "Esta funcionalidade já foi configurada para este grupo.";
     }
 }
Exemplo n.º 23
0
 protected void gridView_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
 }
 protected void AttachmentGridview_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     e.ErrorText = e.Exception.InnerException.InnerException.Message;
 }
 protected virtual void OnCustomErrorText_BaseImplementation(ASPxGridViewCustomErrorTextEventArgs e)
 {
 }
Exemplo n.º 26
0
 void gvPermohonan_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     e.ErrorText = e.Exception.GetBaseException().Message;
 }
Exemplo n.º 27
0
 protected virtual void OnCustomErrorText_BaseImplementation(ASPxGridViewCustomErrorTextEventArgs e)
 {
 }
Exemplo n.º 28
0
        protected override string RaiseCustomErrorText(ASPxGridViewCustomErrorTextEventArgs e)
        {
            var processingResult = ErrorHelper.Process(e.Exception);

            if (processingResult != null) return processingResult;
            
            OnCustomErrorText_BaseImplementation(e);
            
            return base.RaiseCustomErrorText(e);
        }
 protected void ASPxGridView1_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     if(e.Exception != null){
         if (Session["ErrorGenerado"] != null)
         {
             e.ErrorText = Session["ErrorGenerado"].ToString();
         }
     }
 }
Exemplo n.º 30
0
 protected void gdvEstoque_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception.InnerException != null)
     {
         e.ErrorText = e.Exception.InnerException.Message;
     }
 }
Exemplo n.º 31
0
 protected void ASPxGridView1_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     e.ErrorText = e.Exception.ToString();
 }
Exemplo n.º 32
0
 protected void LAdministratorGridview_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     e.ErrorText = e.Exception.ToString();
 }
 /// <summary>
 /// catch insert error and replace with meaningful descriptions
 /// could also over ride this and throw exception on row_inserting event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void dxgrdTarget_CustomErrorText(object sender, ASPxGridViewCustomErrorTextEventArgs e)
 {
     if (e.Exception is NullReferenceException)
     { e.ErrorText = "Null Reference Exception" + e.Exception.Message.ToString(); }
     else if (e.Exception is InvalidOperationException)
     { e.ErrorText = "Invalid Operation Exception" + e.Exception.Message.ToString(); }
     else if (e.Exception is System.Reflection.TargetInvocationException && e.Exception.InnerException.ToString().Contains("duplicate key"))
     { e.ErrorText = "Not able to save record due to a duplicate company name"; }
 }