Questions tagged as 'c#'

1
answer

Problem with RegularExpression in Data annotations

Hi, I'm doing a form and validating with data annotations but I need my user to have no intermediate spaces the problem is that my regulation is not working, could you help me find a solution please. Here is my expression. [Display(Name...
asked by 03.01.2019 / 23:01
2
answers

Error updating

I am working on a windows forms app, Entity Framework, I have an error when doing the Update. public void Update(T entity) { //Context.Set<T>().Attach(entity); Context.Entry(entity).State = EntityState.Modified;...
asked by 06.06.2016 / 17:18
1
answer

Consume Web Service, WCF dynamically

Normally you add a Web Reference in the project and you're ready to consume it from there. But it turns out that I need to do it in the following way. In my App.Config I will be adding the WebService ( .asmx ) and WCF ( .s...
asked by 02.06.2016 / 19:30
1
answer

How to increase the value of a cell in a DataGridView when a code matches? C #

I'm doing a kind of verifier, I need to press a button to check if the code of my TextBox matches in some data of the column "Code" and if so, increase by 1 the value of "Captured", this is what I'm trying now: foreach (DataGridViewRow fila i...
asked by 19.12.2018 / 01:53
2
answers

Validating nulls with linq

I have the following query in linq using (var context = new BusinessContext()) { var result = (from m in context.MovimientoCajas where DbFunctions.TruncateTime(m.Fecha) == DbFunctions.TruncateTime(fecha)...
asked by 19.12.2018 / 14:37
1
answer

C # Events (difference with respect to a Delegate)

I am studying C # but I got to the subject of Delegates and Events, I know it is a delegate and how it works: The delegate is like an "encapsulator" of functions, where we can reference a method through an instance of the delegate. I searc...
asked by 05.01.2019 / 02:35
2
answers

Txt file is not created in C: //

I have a problem, I made a registry application with web services and I added a Log to verify the failures in case something strange happens, like connection failures. When I install my program on other computers and I run it, do not believe...
asked by 14.07.2016 / 17:00
1
answer

Unable to convert a DBNull object to other types

I am creating an application in which you can make reservations, in the mapper of the properties I have passed a method called "LoadProperties" in which I pass the data such as type, etc, the problem is when you I want to pass the user who has r...
asked by 15.07.2016 / 19:23
1
answer

Fill textbox with combobox

I'm trying to fill TextBox from a% of ComboBox , my problem is that I show the data of ComboBox and fill the TextBox but when I change the item in ComboBox the data of TextBox remain static. I share th...
asked by 03.12.2018 / 19:20
2
answers

How can I upload folder, subfolders and everything that these folders contain to my FTP server with C #?

How can I upload my folders to my FTP server and thus there are subfolders that are also uploaded along with all the files they have inside. I have the following code and this only uploads the name of the folder and the files inside. If there i...
asked by 13.12.2018 / 17:44