Questions tagged as 'c#'

1
answer

Return value of the DB in a variable [closed]

I'm trying to return the largest ID of the Budget table in a variable, however it returns me an error:   An unhandled exception of type 'System.NullReferenceException'   occurred in MySql.Data.dll. Additional information:   object not set to...
asked by 20.09.2017 / 00:48
2
answers

How to intercept the project save event in vssdk?

I'm currently developing an extension of visual studio 2017 where I need to know when any design changes are persisted. Ex: When I add a new reference in the project (I know there are events for when the reference is added / changed / removed...
asked by 20.09.2017 / 14:53
1
answer

Use synchronous or asynchronous tasks to collect print counters

I'm trying to develop a process that performs the collection of some printer counters via SNMP protocol, I thought about using Threads to perform this process, I refaced to use tasks, but I do not know if I should use an async await for this tas...
asked by 27.09.2017 / 14:27
0
answers

How to return values from an undeclared View in Model to Contoller by post method

My controller is declared according to the code below: public ActionResult Create([Bind(Include = "a,b,c,d,e")] Proposal proposal, int prjId, int[] array) { if (ModelState.IsValid) { proposal.f = prjId; db.Proposals....
asked by 27.09.2017 / 19:45
0
answers

C # - 5 significant numbers with at least 2 decimal places

Well, someone knows a way that I can transform a number with at least 5 significant digits and added to this factor, should have at least 2 decimal places. Example: -0,00012 >> -0,00012000 12345687,00 >> 12345687,00 123,00 >&...
asked by 27.09.2017 / 22:49
0
answers

How to update only one property of an object using OutputCache in ActionResult

Hello, everyone. I have a problem that I do not even know if there is a solution like this. I have an ActionResult that returns the contents of a chart in Jquery. The result of this graphic will always need to be cached so page does not...
asked by 27.09.2017 / 19:11
1
answer

Filter query

How to insert a filter in my query the command is in a repository and I want to insert a filter in it, it can be by name for example. Code: public IList < T > Consultar() { using(ISession session = FluentnHibernateHelper.OpenSession()...
asked by 27.09.2017 / 16:34
1
answer

Select field in WebBrowser

I need to access this link site and select the 8080 port option. Any tips? Abs     
asked by 29.09.2017 / 03:42
1
answer

Configure multiple Windows Services in a single project

I'm developing a Windows Services project and I've come across the need to run run-time routines and different rules. Is it possible to have multiple windows services in a single project? I've tried the following code more unsuccessfully,...
asked by 28.09.2017 / 19:50
1
answer

Image disappearing [closed]

I have 3 buttons with images that I position in the upper right corner of the screen. If I maximize the screen for just one monitor the images appear correctly, but when I maximize for two monitors the first image turns one stroke and the third...
asked by 22.09.2017 / 22:19