Posts by Gabriel Santos Reis • 375 points
14 posts
-
1
votes0
answers49
viewsQ: How to Remove Chunk of Code using Find and Replace from Visual Studio with Regular Expression?
I’m with a c# application that we’re looking to remove code snippets. One of the situations I have several If/E-s, where Else doesn’t make sense. Type like this (as an example): var entidades=…
-
1
votes1
answer139
viewsQ: How to get string from Enum on an ASP.MVC grid
I have the following: public enum RegiaoEnum { CENTRO = 1, NORTE = 2, SUL = 3, SUDESTE = 4, CENTROOESTE = 5 } And the following View: @using MeuDominio.Enums; <div class="animate"> <table…
-
0
votes2
answers643
viewsQ: Disable button during javascript processing c#
I have the following Asp button: <asp:Button ID="btnOk" runat="server" AutoPostBack="true" CausesValidation="true" ClientIDMode="Static" Text="Ok" Width="80px" OnClick="btnOk_Click"…
-
0
votes3
answers115
viewsA: Page rendering Asp.net Disabledcssclass
In accordance with Douglas Garrido commented, all I had to do was change the css tag to Cssclass, which I already solved, it was a lot of distraction for me not to notice it, and I didn’t even think…
-
1
votes3
answers115
viewsQ: Page rendering Asp.net Disabledcssclass
I have the following problem, I have this code on a page: <div class="modal-footer"> <asp:Button runat="server" ID="btnCancelar" Text="Cancelar" class="btn btn-sm btn-danger"…
-
1
votes1
answer187
viewsQ: Configure Route MVC page
I have a website and when entering the home page it is redirected to another view. Thus: www.exemplo.com redirects to www.exemplo.com/Home/Hotsite That’s because I have a feature that when entering…
-
11
votes5
answers64617
viewsQ: Monetary mask with jquery.inputmask
How do I create a mask for a monetary value? I’m wearing this: $(".ValoresItens").inputmask('R$ 999.999.999,99', { numericInput: true}); was like: R$ ____. ____. _25,00 But I didn’t like these…
-
1
votes1
answer94
viewsQ: Insert multiple Entity Framework items
I have the following method to add doclient data public void Alterar(CLIENTE Cliente) { using (Entity.DominioEntity db = new Entity.DominioEntity()) { //Alterar/Adicionar Telefone foreach (var item…
-
1
votes1
answer27
viewsQ: Problem with registering jquery
I have an ASP.NET application with the structure Next: ProjetoWeb (raiz projeto) Compartilhado (pasta) |---Scripts (pasta) |----jquery-1.8.0.js Masters (pasta) |----Site.master Cadastros (pasta)…
-
0
votes2
answers54
viewsA: hierarchyid, remove children from one node and assign to another node
I resolved it that way: DECLARE @CD_USUARIO_OLD INT DECLARE @CD_USUARIO_NEW INT SET @CD_USUARIO_OLD = 1 SET @CD_USUARIO_NEW = 2 DECLARE @NODE_USUARIO_OLD hierarchyid DECLARE @NODE_USUARIO_NEW…
-
1
votes2
answers54
viewsQ: hierarchyid, remove children from one node and assign to another node
I have a user table, with the use of hierarchyid, I need to remove all Subordinate Users from User 1 and assign them to User 2. SELECT US.cd_usuario ,(SELECT cd_usuario FROM USUARIO USR WHERE…
-
3
votes2
answers642
viewsQ: Execute server method when closing the browser
I need the user to close the browser or the page tab, update the status Logged in that is in the database (to control user access). For this use the following Method JavaScript:…
-
5
votes5
answers69449
viewsA: How to make a regular expression for mobile phone?
I use this @"^\(?\d{2}\)?[\s-]?[\s9]?\d{4}-?\d{4}$" If you put 9 digits it forces you that the first digit is 9. I would take a little of each example to assemble the ideal.…
-
1
votes1
answer207
viewsQ: Get the parent by passing the child code using Hierarchical Data (SQL Server)
How do I get EmployeeID of the father passing the EmployeeID of the child in the table below using the type variable hierarchyid in SQL Server? CREATE TABLE Employee ( Node hierarchyid PRIMARY KEY…