Posts by Thomas Erich Pimentel • 3,059 points
164 posts
-
0
votes2
answers1595
viewsA: Check if there is value in List
I was able to solve it by changing the condition code to: if (!item_edit.Exists(x => x.item == a )) { item_edit.Add(new Part_edit { item = a, qnt = b}); }…
-
1
votes2
answers1595
viewsQ: Check if there is value in List
I’m trying to make a condition, where I would check, whether in a List there is a value, so I created the following: private void Itens_Edit(object sender, EventArgs e) { if(editar == 1) { int a =…
-
1
votes2
answers3778
viewsQ: Return the shortest date within Select
I have the following table: CREATE TABLE [dbo].[Crm_man]( [id] [int] IDENTITY(1,1) NOT NULL, [nCRM] [int] NULL, [cliente_CRM] [int] NULL, [item_CRM] [int] NULL, [qnt_CRM] [int] NULL, [descri_CRM]…
-
0
votes2
answers1946
viewsA: How to release memory after performing a certain task?
I managed to solve the problem, with the following code: if (pictureBox1.Image != null) { pictureBox1.Image.Dispose(); pictureBox1.Image = null; } Refencia: How to set images at runtime (Windows…
-
0
votes2
answers1946
viewsQ: How to release memory after performing a certain task?
In a certain task, I have to upload 6 photos in 6 PictureBox, for this I use the method below: private void simpleButton1_Click(object sender, EventArgs e) // botao carregar foto { OpenFileDialog…
-
1
votes1
answer340
viewsQ: To return multiple rows with sql Server byte array
I need to perform a query, in a table, where the data is of the type varbinary(max), then created the method below: public List<byte[]> preenche_fotos(string nCrm) { consql.bd_string();…
-
3
votes3
answers96
viewsQ: Capture Textbox that called the event
I want to implement the wind GotFocus in a TextBox, so that when, he gets the focus, he sets the property Text as string.empty. However, I have 6 TextBox that will run this event. How do I identify…
-
6
votes2
answers1906
viewsQ: Convert and save photo in BD
I am working on a project where I have to save some photos. So I am studying the best way to accomplish the task. I thought about saving in the database, because these photos will be accessed both…
-
0
votes1
answer51
viewsA: Test Expression as user type
To solve the problem I used the method: Posteditor I used the method PostEditor, to save the user input, and then be able to compare. Yeah, if we don’t make the method call, PostEditor, it will only…
-
1
votes1
answer51
viewsQ: Test Expression as user type
I’m having problems trying to test an expression as the user type. I have a TreeList where the user will enter a code, this code has the model: XXXX-XXXX-XXX I mean, it could be anything like:…
-
1
votes0
answers932
viewsQ: Timer - run at set time
I am developing a Windows Service, where every day at 18:00 hours, I need an event to be triggered. So I’m using the class Timer. I managed to trigger an event by defining the property Interval,…
-
7
votes1
answer107
viewsQ: Compare Strings by format not by value
I have a shape of a String, for example: xxxx-xxxx-xxx But instead of the x can enter several letters or numbers, example: A216-0450-013 X2LP-1018-589 Y585-0000-047 What I need to do is compare to…
-
0
votes1
answer664
viewsQ: Push notifications
I am developing a program in which several users will use, and would like to develop a system with notification Push, for when some user performs a Insert in the database. I would like it to be, for…
-
0
votes1
answer41
viewsA: How to pass SELECT DB Pervasive parameter
By default Pervasive uses the symbol ? to identify the parameter, instead of @ in the query. So that’s how it was: SELECT a.code_client AS CODIGO, a.raison_sociale AS 'RAZÃO SOCIAL', a.Adresse_1 AS…
-
1
votes1
answer41
viewsQ: How to pass SELECT DB Pervasive parameter
I’m having to work with Pervasive database, so I’m having trouble passing a parameter to perform a SELECT I’ve tried using: DBCmd.Parameters.Add("@inicio", PsqlDbType.VarChar).Value = date_inicio;…
-
3
votes1
answer887
viewsQ: How to make your program reliable - windows security
I finished a step of a program and we will start to put in production, however, when running the program is always displayed the message below: What should I do to make my program reliable? and stop…
-
4
votes1
answer607
viewsQ: Format @Html.Label - MVC
On my page I have one: @Html.ActionLink(linkText: "Bem Vindo(a) " + User.Identity.GetUserName() + "!", actionName: "Index", controllerName: "RelatorioTagModels1") Which generates, the "Welcome" page…
-
1
votes1
answer352
viewsQ: How to pass parameter to Index from another Controller
I have to pass a parameter (ID) to a controller’s index, I tried to use the ActionLink but it didn’t work. View: <body> <table class="table"> <tr> <th>…
-
2
votes2
answers1081
viewsQ: List table with condition ASP.NET MVC
I’m studying ASP.NET MVC5, so I did one Model called 'Reporteriotagmodels' containing: public class RelatorioTagModels { [Key] public int TagID { get; set; } [Required] public string Tag { get; set;…
-
0
votes1
answer220
viewsQ: Empty generated migration after Scaffolding
I’m studying ASP.NET MVC5, so I created a model called RelatorioTagModels: public class RelatorioTagModels { [Key] public int TagID { get; set; } [Required] public decimal Tag { get; set; }…
-
1
votes1
answer124
viewsQ: IF condition in javascript only works once
I’m trying to make a Side Navigation, so in Internet search, I found a little tutorial on the site: How TO - Side Navigation However, in my example I wanted a single button to open and close, so I…
-
0
votes1
answer415
viewsQ: How to return only the ref. data to the logged in user
I have a table that returns the following data from an SQL Server database: INITIAL KM; KM Final; Liters; R-value$. However I would like to return only the values ref. to the logged in user. In the…
-
1
votes1
answer395
viewsQ: How to fill in an Editorfor as the login user name
I have a View, where the user must fill in some fields, and has a last field that I left him disable, and would like that in this field appears the name of the user, but how do I fill? Model: public…
-
2
votes1
answer138
viewsQ: When changing a Model, how to redo Scaffolding?
I have a model, called CombustivelModels, where I made a Scaffolding generating the Controller and the Views, my doubt is, when making a review on that Model, has how to update via Scaffolding the…
-
0
votes1
answer143
viewsQ: Error while trying to generate Scaffolding
I’m trying to generate a Scaffolfing for the model below: namespace OneeWeb_v2.Models { public class CombustivelModels { [Key] public int CombustivelId { get; set; } [Required] public decimal…
-
2
votes2
answers490
viewsQ: How to save data to SQL database - Submit
I am studying ASP.NET MVC, I am using the Identity to carry out user control and etc. So, I created a page, where the user will enter with 4 information: Mileage Initial; Mileage Final; Quantity of…
-
1
votes1
answer376
viewsQ: How much to use @Html.Actionlink or Javascript
I’m having trouble understanding when to use a @Html.ActionLink or javascript:document.getElementById('Comercial').submit() For example: <a><i class="fa fa-home"></i> Home <span…
-
4
votes1
answer691
viewsQ: How to recover logged in user name and display in View
I’m trying to develop a page, where after the user login, it is redirected to an index, where I would like to display the user name. I’m using Identity default of ASP.NET MVC. So I thought I’d put…
-
6
votes3
answers4358
viewsA: ASP.NET Web Forms or MVC. What’s Best and Fastest?
Hard to talk like that, it’s better.. When it comes to types of programming, a lot will depend on your knowledge of programming, and of course on the language in question. The Web Forms. As general…
asp.net-mvc-5answered Thomas Erich Pimentel 3,059 -
0
votes1
answer188
viewsA: How to set "Check" in columns with Repositoryitemcheckedit
Well, after a lot of fighting and spending the day chasing an answer, I was able to do. The secret is that for each column, a Dictionary (Obs. I used Dictionary but it may be List and similar). So I…
-
0
votes1
answer188
viewsQ: How to set "Check" in columns with Repositoryitemcheckedit
I have a DataGrid that some columns are CheckBox, I’m using the method RepositoryItemCheckEdit from Devexpress to do this: However, how do I make a Check? I know I need to use the property…
-
4
votes2
answers1274
viewsQ: How to redirect user to page after login?
I am developing a web application, using Asp.Net MVC 5 com Identity and I’m using Roles to carry out the authorisation. I’m trying to do that depending on the Role that the user has, it is directed…
-
0
votes2
answers673
viewsQ: How to redirect if user is unauthorized
I am using in my application, roles and I am trying if, user is not authorized, is redirected to an error page. I’m using ASP.NET MVC com Identity, in research on the Internet and here at…
-
1
votes0
answers240
viewsQ: How to make access permissions via Authorizeattribute
I’m researching how to implement an access control in my web application. I am using Asp.Net MVC with Identity, the idea is that a certain user can only access certain page. So, in research I found…
-
0
votes1
answer544
viewsQ: How to reference an image <img> tag
I’m studying Asp.Net MVC and I’m having trouble defining the tag URL HTML: <!-- menu profile quick info --> <div class="profile"> <div class="profile_pic"> <img…
-
1
votes1
answer1071
viewsQ: How to use different CSS files for each view
I wonder if it is possible to be using CSS files "helpers". For example, in my ASP.NET project MVC 5, as everyone knows, and default the use of BootStrap, but it would have to create a separate .…
-
1
votes1
answer64
viewsQ: How to create a Privatefontcollection
I have some fonts that are not standard Windows, so I’m creating a PrivateFontCollection but I’m having a hard time. These sources are used by the entire program, so I thought I’d create a Classe…
-
0
votes1
answer1598
viewsQ: How to use, install, free template for Bootstrap 3
I have a tremendous doubt about this type of Theme, I’m starting to mecher with ASP.NET MVC, so I came across this Bootstrap, so I started researching about free themes and we have several options…
-
2
votes2
answers1172
viewsQ: How to make a button with Razor and Css
I’m trying to make a button on a particular page. However, my entire project started with the Razor engine, so I would like to know how I can make a button with such engine, I am trying to do so:…
-
4
votes2
answers15005
viewsQ: How to place an image in an HTML button
I am creating a button on a given page and would like to put a background image. I’m trying to tag background-image:url() in CSS but not working. HTML: @model…
-
2
votes1
answer468
viewsQ: How to position a Span tag on the page?
I’m studying ASP.NET MVC 5 and I’m trying to create a page where, in the upper left corner, I would have a "Menu" button, I was able to create the button and action, but I’m having trouble locating…
-
2
votes2
answers91
viewsA: Visual Studio 2015 - Team Fundation - Erro projeto Asp.Net MVC
The problem is really the lack of Nuget packages, but this error is generated by having climbed the project incorrectly to Team Fondation. I was doing, by the button "Add items to Folder": However…
-
1
votes2
answers91
viewsQ: Visual Studio 2015 - Team Fundation - Erro projeto Asp.Net MVC
Someone is having trouble moving up an ASP.NET MVC project to Team Fundation? What happens is, I do the up, but when I run on another computer, it starts giving referencing errors not found I…
-
7
votes2
answers808
viewsQ: How to save program settings, database or configuration file?
In my application, the admin user, can make some settings, for example: Configure if you want to use specific product templates, or stay open for the end user to type. Configure if you want to use…
-
1
votes1
answer260
viewsQ: How to assign Combobox value to variable?
I am customizing the user registration part using the Entity Framework Identity tool. So on the registration page, I added a ComboBox (Select in HTML): Part of my View: <div…
-
0
votes2
answers111
viewsQ: Is it right to use string when the value is integer?
Today I came across a certain situation that left me in doubt: In my application I have some ID's from a table, these ID's are integer values (1,2,3, and so on) and I treat them all as string. One…
-
1
votes0
answers162
viewsQ: Web.config encryption and RSA key container
It’s been discussed how encrypt Web.config, has also been discussed as use encrypted Web.config, but my doubt is as follows: If you are using the default provider Rsa Protected Provider to perform…
-
0
votes1
answer26
viewsA: How to perform event with instantiated class in another method
I was able to solve it this way: private void click_datagridview4(object sender, EventArgs e) { BandedGridView bandgridview4 = (BandedGridView)sender; id_etiqueta =…
-
1
votes1
answer26
viewsQ: How to perform event with instantiated class in another method
I have a method that triggers a "Bandedgridview" : private void popula_retContrato(string contrato) { Classes.Datatable.Datatable_cliContrato dat_contrato = new…
-
4
votes2
answers907
viewsQ: How to work with lock in SQL records?
I’m studying best practice to work with lock of records. What I mean is, I have several tables that can be accessed by several users simultaneously, but if any attempt is made to edit the record,…