[Solved] c# Devexpress datagridview to gridcontrol. manualy

You should use the following code to make the ASPxGridView show data from this table: if (connection.State == ConnectionState.Closed) { connection.Open(); SqlCommand cmd = new SqlCommand(“Select * From YazHata order by HataAdi ASC”, connection); SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); ASPxGridView1.DataSource = dt; // <<<< ASPxGridView1.DataBind(); //<<<<< da.Dispose(); connection.Close(); } … Read more

[Solved] i am getting this error saving the data in Sql Server “conversion failed when converting date and/or time from character string.”. below is my code:

Change insQury to string INSQURY = ” insert into [MTS_TV_RO_TC_FINAL] ([DATE],[CAPTION_NAME],[IST],[DURATION],[AMOUNT],[CRID],[JOB_CODE],[AGENCY_CODE],[STATUS],[TBAND_IN],[TBAND_OUT],[DATE_FROM],[DATE_TO],[CREATE_DATE],[USER_NAME],[REMARKS],[Ro_Name],[Job_Name]) SELECT [DATE],[CAPTION],[IST],[DURATION],[AMOUNT],[CRID],'” + TJOBCODE + “‘,[Agency_code],[STAT],[TBAND_IN],[TBAND_OUT],COMP_FROM, COMP_TO,GETDATE() AS DT,'” + Global.uname + “‘ ,[REMARKS],'” + TRo_Name + “‘,'” + TJob_Name + “‘ FROM ” + tmptvrlbktbl + ” ORDER BY DATE”; If COMP_FROM and COMP_TO are dates already you don’t need to surround them … Read more

[Solved] Regular Expression to find out tag and get the value of HREF using C# [duplicate]

Don’t use Regex to parse html. A correct way would be using an html parser like HmlAgilityPack var doc = new HtmlAgilityPack.HtmlDocument(); doc.LoadHtml(htmlstring); var links = doc.DocumentNode.SelectNodes(“//a”) .Select(a => a.Attributes[“href”].Value) .ToList(); solved Regular Expression to find out tag and get the value of HREF using C# [duplicate]

[Solved] Connecting with 3 different databases [closed]

Yes you can do that, you have to go to your web.config file and write this. <configuration> <connectionStrings> <add name=”First” connectionString=”…”/> <add name=”Second” connectoinString=”…”/> <add name=”Third” connectionString=”…”/> </connectionStrings> </configuration> You have to change the name of each connection and the connectionString too. 0 solved Connecting with 3 different databases [closed]

[Solved] operator ‘&&’ cannot be applied to operands of type ‘string’ and ‘string’

You need to use logical operators each time. IF you want to chack all strings to inequality to empty string then use String.IsNullOrEmpty() method instead of != operator. Also there is no reason to use () in your expression. You need to use brackets to prioritize operations but in your code there is no prioritets … Read more

[Solved] How do I find a substring in a string? [closed]

Contains is too slow for large numbers of data, plus it matches the domain and the in-the-middle occurences as well. So use StartsWith System.Data.DataTable dt = //Whatever foreach(System.Data.DataRow dr in dt.Rows) { //string email = dr(“email”); string email = “[email protected]”; if (email != null && email.StartsWith(“companyby”, StringComparison.OrdinalIgnoreCase)) { // do whatever here } } With … Read more

[Solved] Multitier Architecture [closed]

I suggest that you read on how to ask a good question first Straight from Separation of concerns: design principle for separating a computer program into distinct sections, such that each section addresses a separate concern. I hope that you are not the developer taking over this project, because it seems like you have minimal … Read more

[Solved] Port reading application in .Net which is better Windows service or Windows application

Yes, a windows service would be fine. I’d like to use a little library called TopShelve to make a service / console app. Then I’d add NancyFx to expose the service and it’s data (or read it from a shared database). You also asked if there was a ‘better’ way. You might argue that polling … Read more