Example #1
0
 protected void DeleteTipo(int idTipo)
 {
     try
     {
         var Tipo = new Tipo();
         Tipo.IDTipo = idTipo;
         Tipo.Delete();
         GetTipos();
     }
     catch (Exception err)
     {
         Page.ClientScript.RegisterStartupScript(this.GetType(), "script", "<script>alert('" + FormatError.FormatMessageForJAlert(err.Message) + "')</script>");
     }
 }
Example #2
0
        public static void Delete(IType objiTypeValues, IType iType, string namePropertyId)
        {
            var pTipo = objiTypeValues.GetType().GetProperty(namePropertyId);

            if (pTipo.GetValue(objiTypeValues, null) == null)
            {
                throw new TradeVisionValidationError("IDTipo obrigatório para a ação GET");
            }
            var tipoTabelaColuna = new TipoTabelaColuna(iType);

            tipoTabelaColuna.Get();
            if (tipoTabelaColuna.IDTipoTabelaColuna != null)
            {
                var tipo = new Tipo();
                tipo.TipoTabelaColuna = tipoTabelaColuna;
                tipo.IDTipo           = (int?)pTipo.GetValue(objiTypeValues, null);
                tipo.Delete();
            }
        }
Example #3
0
 public void Delete()
 {
     Tipo.Delete(this, new Endereco(), "IDTipoEndereco");
 }
Example #4
0
 public void Delete()
 {
     Tipo.Delete(this, new Telefone(), "IDTipoTelefone");
 }
Example #5
0
 public void Delete()
 {
     Tipo.Delete(this, new Documento(), "IDTipoDocumento");
 }
Example #6
0
 public void Delete()
 {
     Tipo.Delete(this, new Email(), "IDTipoEmail");
 }
Example #7
0
        public static void Delete(IType objiTypeValues, IType iType, string namePropertyId)
        {
            var pTipo = objiTypeValues.GetType().GetProperty(namePropertyId);

            if (pTipo.GetValue(objiTypeValues, null) == null) throw new TradeVisionValidationError("IDTipo obrigatório para a ação GET");
            var tipoTabelaColuna = new TipoTabelaColuna(iType);
            tipoTabelaColuna.Get();
            if (tipoTabelaColuna.IDTipoTabelaColuna != null)
            {
                var tipo = new Tipo();
                tipo.TipoTabelaColuna = tipoTabelaColuna;
                tipo.IDTipo = (int?)pTipo.GetValue(objiTypeValues, null);
                tipo.Delete();
            }
        }