15,891,607 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by george4986 (Top 200 by date)
george4986
4-May-17 7:37am
View
try this
Value = Value.Replace("<", "<");
Value = Value.Replace(">", ">");
george4986
4-May-17 7:33am
View
Deleted
try this
Value = Value.Replace("<", "<"); Value = Value.Replace(">", ">");
george4986
26-Sep-16 1:06am
View
Working Code Thanks For Your Effort -> Joezer BH
george4986
10-Aug-16 1:56am
View
doesn't worked in my case.Thanks for sparing your time ;-)
george4986
16-Jan-15 0:32am
View
Awesome it works , thanks CHill ;-)
my code is
DataSet ds = objCon.DataSet;
DataTable[] dta = new DataTable[ds.Tables.Count];
ds.Tables.CopyTo(dta, 0);
ds.Tables.Clear();
foreach (DataTable t in dta.OrderBy(c => c.TableName))
{
ds.Tables.Add(t);
}
george4986
15-Jan-15 5:00am
View
I will check the link.thanks for ur effort.use improve solution option & plz dont post multiple answer threads.
george4986
15-Jan-15 4:39am
View
i have checked ur links , i know its possible to filter/sort contents of tables in a dataset . but my requirement is ordering tablenames in dataset.hope its clear to u.thanks for the effort.
george4986
15-Jan-15 4:37am
View
is it possible in front end? i know its possible in backend.
thanks for ur reply.
george4986
13-Jan-15 2:05am
View
these tables are loaded on a reporting tools datasource section.I can access this dataset.Now am trying a way to reorder the tables.
george4986
13-Jan-15 1:17am
View
yes but my client needs the ordering
george4986
13-Jan-15 1:14am
View
i am using a 3rd party reporting tool,by default it loads dataset tables without order
george4986
20-Nov-14 22:25pm
View
thanks Bruno ;-)
george4986
20-Nov-14 22:25pm
View
thanks Maciej Los ;-)
george4986
12-Nov-14 23:58pm
View
good or bad weather? ;-)
george4986
10-Nov-14 0:40am
View
nice links ;-)
george4986
7-Nov-14 6:06am
View
refer this link
http://www.codeproject.com/Answers/820886/how-to-update-csharp-application-using-setup-for-i?cmt=677058#answer1
george4986
6-Nov-14 4:16am
View
is ur "dt" returning duplicate values of "InformType"?
george4986
3-Nov-14 22:26pm
View
oh Ok . Plz tag the question in ASP.Net 2.0 u will get more accurate answers.
In case of windows forms we can do it like
string value="ur textbox value";
if (value.StartsWith("0") || value.StartsWith("1"))
{
//valid case
}
else
{
//clear text box
//show message if needed
}
in the "lost focus" or "leave" event of textbox
george4986
3-Nov-14 1:16am
View
windows forms/ASP.NET?
george4986
3-Nov-14 1:14am
View
the table structure is bad,U can't distinguish the price of material between months while reading from this table structure.
george4986
3-Nov-14 1:07am
View
nice explanation ;-)
george4986
23-Oct-14 1:15am
View
if u dont like the answer why dont u ignore the answer instead of insulting the one who tried to help? is this kind of response , u mean by "professional behaviourism"?.google is a medium to search for information,u have searched here for information regarding ur questions answer(kind of googling).So what is the difference good developer?
george4986
16-Oct-14 4:11am
View
pass the ddl_val to backend and fetch only matched record instead of loading all records in table
george4986
14-Oct-14 0:46am
View
U cannot specify a format to save datetime in SQL,but u can select a saved date time in customized formats
george4986
9-Oct-14 2:31am
View
u mean reverse?
george4986
8-Oct-14 23:50pm
View
if u have more than one rows then it will be a table having two columns and multiple rows right? why dont u convert the datatable to xml?
george4986
6-Oct-14 7:27am
View
A simple solution is "It Depends on type of application".
I will tell u what i do (I develop ERP projects).
in case of ERP we need to incorporate many modules like Human resources,production,marketing,inventory,...
we devolep each module as seperate solutions,make them dlls.(plug and play modules as per client requirements)
refer these dlls to an application( if a client dont want a module we dont refer that module's dll in the application)
application contains client specific forms(requirements not asked by other clients) and
integration forms(entry and end point of modules).
if i have similar code in my form i change it to a function,
similar code in my application i change it to a class,
similar code/controls/functionality in my projects i change it to a dll.
the sole purpose of a function/class/dll is reusablilty.
but developing module wise dlls common for multiple clients is not easy,its a combined outcome of experiance,case studies,analysis,...
good luck ;-)
george4986
6-Oct-14 5:24am
View
posting same question more than once is not a good way to ur solution
http://www.codeproject.com/Questions/826174/pleae-provide-validations-code?arn=18
george4986
6-Oct-14 0:05am
View
ur start date in table data and result doesn't match
george4986
28-Sep-14 23:32pm
View
as per ur given info the chat table structure is like below right?
ID (Message ID) Message (Message area) From (ID of sender) To (ID of retriever).
can u provide the user table structure?
george4986
26-Sep-14 4:39am
View
what about other values ,does they also differ in xml and html?
are u sure no encryption is used in xml?
george4986
26-Sep-14 2:59am
View
can u post the xml structure and ur html conversion code here?
george4986
26-Sep-14 1:36am
View
post ur code here
george4986
26-Sep-14 1:34am
View
can u plz tell me how "381403800" is related to "1982-02-01 09:30:00.000" ?
george4986
25-Sep-14 23:58pm
View
what u want? printer exists in network?
"Solution Worx - HQ" is that a print queue item or printer name?
use improve question option
george4986
25-Sep-14 12:45pm
View
thanks 4 sharing ;-) my +5v
george4986
25-Sep-14 12:37pm
View
u r always welcome ;-)
george4986
25-Sep-14 7:13am
View
updated the solution plz check
george4986
25-Sep-14 6:59am
View
do u need value inside tag like search?
george4986
25-Sep-14 6:52am
View
reference
http://msdn.microsoft.com/en-us/library/system.xml.linq.xelement(v=vs.110).aspx
george4986
25-Sep-14 6:26am
View
instead of adding new solutions, please update ur previous solution with new code
george4986
25-Sep-14 5:11am
View
"////ur code shown in above question" means
if (dataGridView1[e.ColumnIndex, e.RowIndex].Style.BackColor == Color.Empty)
dataGridView1[e.ColumnIndex, e.RowIndex].Style.BackColor = Color.Black;
else
dataGridView1[e.ColumnIndex, e.RowIndex].Style.BackColor = Color.Empty;
only not all code in cell click
george4986
25-Sep-14 4:40am
View
u r welcome ;-)
plz refer given link for reference.
george4986
25-Sep-14 3:36am
View
added ;-)
george4986
25-Sep-14 3:11am
View
if(DateTime.Now.Day==1)
{
///day is 1
}
george4986
25-Sep-14 2:49am
View
post ur code here
george4986
25-Sep-14 2:37am
View
replace
string strmode;
of form 2 with below
string strmode = string.Empty;
george4986
25-Sep-14 2:35am
View
plz check the solution posted below
george4986
25-Sep-14 0:10am
View
post ur code here
george4986
24-Sep-14 1:31am
View
U r always welcome ;-)
plz google and study difference of ShowDialog(); and Show();.
if u have time.good luck coding.
george4986
24-Sep-14 1:20am
View
Deleted
int value = 15;
string outString = "" + value + "";
happy now ;-)
george4986
24-Sep-14 0:34am
View
try
fullView.Show();
instead of
fullView.ShowDialog();
george4986
24-Sep-14 0:23am
View
post ur code here
george4986
24-Sep-14 0:04am
View
check my solution its a working one
george4986
23-Sep-14 7:10am
View
my +5v ;-)
george4986
23-Sep-14 7:07am
View
u should post this as an answer ;-)
george4986
23-Sep-14 1:11am
View
try this link
http://msdn.microsoft.com/en-us/library/9t4syfhh(v=vs.110).aspx
george4986
22-Sep-14 1:20am
View
u r always welcome ;-)
george4986
21-Sep-14 22:36pm
View
sorry SA , I will ask my further questions as new threads.Once again Thanks ;-)
george4986
21-Sep-14 10:43am
View
thanks SA ;-) for ur feed back.I will definitely check the "portable version". my 5v+ .
george4986
20-Sep-14 1:35am
View
did u used string builder and appendline function?
whats ur character length on test print?
what are the character lengths u specified for each fields?
did u add any column other than formatted like 'Math.Round(d, 2) + 'in ur code?(have u checked Sinisa Hajnal's solution?)
george4986
20-Sep-14 1:27am
View
u r always welcome ;-)
george4986
20-Sep-14 0:45am
View
hi SA
I have developed a similar application for update exe versions in client machines.we are using windows forms along with web service for connecting live (Database)DB.
.On each installation i save the version in client machine along with msi file.when a new version is released ,we update the version value in a table on live DB and place new msi file on hosting machine(3 tier application).each login time application exe check the live table version with clients version and give user an info msg about new version .User needs to run updater exe for updation.while running updater application it uninstalls previous version using the old msi version stored in client machine ( string arg = "/x \"C:\\OldApplication.msi\"/qn";) , download & installs new exe( string arg1 = "/i \"C:\\Application.msi\"/qn";).updator application is working. Thanks SA for ur patience in reading this message . Is it possible to make it a single application instead of using Two exe's (updator, application) in my case?.If i have done it in a wrong way , plz enlighten me.Waiting for ur valuable suggestions.Thanks in Advance ------------------George--------------
george4986
19-Sep-14 7:07am
View
first of all u need to check if ur data exceeds one line.
u can test it by entering characters without space from begining of a line and test print it,count the characters thats ur page length .
u are adding the 3,19,30,40,50... spaces in a line right.its sum should be equal to page length calculated above.
george4986
19-Sep-14 7:01am
View
check updated solution .assuming ur sql data type is varbinary(MAX)
george4986
19-Sep-14 5:17am
View
copy pic data from database table field and post here as reply.
keltron ? student there?
george4986
19-Sep-14 4:21am
View
can u post value of dt.Rows[0][0] here
george4986
19-Sep-14 3:19am
View
specify the buffer length
"byte[] imgdata = new byte[0];" doesn't work
george4986
19-Sep-14 2:43am
View
check value of sb in this code
StringBuilder sb = new StringBuilder();
string strline = string.Format("{0,-3}", "1") +
String.Format("{0,-19:dd MMM yyyy}", " 07 Aug 2012") +
string.Format("{0,-30}", "By IB-2012220152498-cash") +
string.Format("{0,-50}", "10938") +
string.Format("{0,-50}","44929.00");
string strline1 = string.Format("{0,-3}", "1") +
String.Format("{0,-19:dd MMM yyyy}", " 07 Aug 2012") +
string.Format("{0,-30}", "By -cash") +
string.Format("{0,-50}", "10938.64") +
string.Format("{0,-50}", "449.00");
sb.AppendLine(strline);
sb.AppendLine(strline1);
sb.AppendLine(strline);
alignment is not changing..
george4986
19-Sep-14 0:50am
View
i haven't tried restoring yet.I hope these links will help u.
http://www.mssqltips.com/sqlservertip/3160/recover-deleted-sql-server-data-and-tables-with-the-help-of-transaction-log-and-lsns/
http://www.techrepublic.com/blog/the-enterprise-cloud/restore-your-sql-server-database-using-transaction-logs/
george4986
19-Sep-14 0:13am
View
debug ur code ,use break point
run code like below providing values directly
string strline = string.Format("{0,-3}", "1") +
String.Format("{0,-19:dd MMM yyyy}", " 07 Aug 2012") +
string.Format("{0,-30}", "By IB-2012220152498-cash") +
string.Format("{0,-40}", "0") +
string.Format("{0,-50}", "0") +
Math.Round(0.0, 2) +
string.Format("{0,-60}", "10938") +
Math.Round(0.0, 2) +
string.Format("{0,-80}","44929.00");
after passing this line view value of strline .
change code to match ur desired output,make a single line correct then use the loop .good luck
george4986
19-Sep-14 0:05am
View
whats the value of d ,d1?
george4986
18-Sep-14 6:27am
View
namespaces used
using System.Windows.Forms;
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Data;
george4986
18-Sep-14 6:22am
View
Eagle Eye my +5v ;-)
george4986
18-Sep-14 6:17am
View
instead of posting 'co.ToString(),per1,ds.Tables[0].Rows[i][3].ToString()' post there values like 'value' on their corresponding fields will improve ur question.
george4986
18-Sep-14 5:20am
View
i have updated the solution plz check
george4986
18-Sep-14 1:47am
View
does order of UID on updation matters?
ie is
12 11796 50
13 11796 45
15 11796 48
same as
13 11796 50
12 11796 45
15 11796 48
on ur desired output?
george4986
17-Sep-14 23:24pm
View
no its returning 362.650
try select Round(362.645,2) on ur sql server.
george4986
17-Sep-14 23:17pm
View
nice sharing my +5v ;-)
george4986
17-Sep-14 23:08pm
View
thanks Bill ;-)
george4986
17-Sep-14 3:01am
View
if its working code in VB then use http://converter.telerik.com/
george4986
17-Sep-14 1:25am
View
thanks for ur feed back .can u plz post value of i/p tableA ,i/p tableB and expected output table.
george4986
16-Sep-14 23:26pm
View
nice code my +5 ;-)
george4986
16-Sep-14 23:26pm
View
nice code my +5 ;-)
george4986
16-Sep-14 23:24pm
View
in my code 's4.Length/2-1' calculates the number of ':' present in the string.
so the total final length of result= current length +appended ':'.
ie for 123456 length =6+2 =8.
first we add ':' after 2 digits, then adding after 3 digits (2+ count of':').
iterations are the least here(reduced more than half i suppose). happy coding. good luck ;-)
george4986
16-Sep-14 23:13pm
View
u r always welcome ;-)
george4986
16-Sep-14 6:15am
View
feel free to rate down if its not working many thanks ;-)
george4986
16-Sep-14 1:58am
View
i think this solution is to be Placed above all other solutions.
My +5V ;-)
george4986
15-Sep-14 6:44am
View
u r always welcome ;-)
george4986
15-Sep-14 6:02am
View
oh. sorry i didn't get u earlier. thanks for the feed back
george4986
15-Sep-14 6:01am
View
a sample solution is added for reference
george4986
15-Sep-14 3:29am
View
what u mean by seconded? its a suggestion not a solution(his coding not checked ) also the question header is not correct
george4986
15-Sep-14 3:19am
View
okay thats nice to iterate less but what if the client dont need a group box in the Form.thanks for the reply.
george4986
15-Sep-14 2:57am
View
instead of adding new group box and checking 'groupBox1.Controls' why not using 'this.Controls'?
george4986
15-Sep-14 1:55am
View
why dont u use auto text?
george4986
15-Sep-14 0:09am
View
add an else block after
'if (dr == DialogResult.Yes) {}'
set the checkbox cells value to Falsevalue
also change the heading of the question to ur requirement
george4986
13-Sep-14 4:29am
View
plz remove for each loop and add below code
RadioButton rd = (RadioButton)sender;
GridViewRow row = (GridViewRow)rd.NamingContainer;
george4986
13-Sep-14 2:52am
View
whats the value of hdn.Value?
why dont u add another else after else if (r4.Checked){}
and update score as zero?
george4986
13-Sep-14 2:43am
View
refer below link
http://repo.hackerzvoice.net/depot_madchat/ebooks/Oreilly_Nutshells/books/oracle/prog2/ch06_06.htm
george4986
13-Sep-14 2:15am
View
post ur code ,its a typing mistake
george4986
13-Sep-14 2:12am
View
where u want to display the dragged data form1 or form2?
are u using form 2 for entering values to list?
after entering u are closing form 2 right?
george4986
13-Sep-14 0:52am
View
post ur code here
george4986
13-Sep-14 0:44am
View
use union all/union query if implimenting in backend.
use merge function of datatable for front end.
george4986
12-Sep-14 6:54am
View
use improve question option
george4986
12-Sep-14 6:08am
View
u are always welcome ;-)
george4986
12-Sep-14 5:20am
View
you should taken care of that also coz its an error.
converted to decimal becoz it is going to be placed in a container of type decimal.
george4986
12-Sep-14 4:50am
View
i have seen ur solution ,it will throw exception if a string value is passed.
why didn't u predict that ?
george4986
12-Sep-14 3:36am
View
if dr[1] is null or empty Total_Sqrft is set to zero.
if any numeric value is passed it will be converted to decimal.
if any character or special sharacters are passed it will throw error .
george4986
12-Sep-14 1:46am
View
it is an easy fix ,string value can store upto 2 Gb.
refer this link
http://stackoverflow.com/questions/810797/which-is-better-return-value-or-out-parameter
george4986
12-Sep-14 1:29am
View
check the solution it may work
george4986
12-Sep-14 1:03am
View
where u declare tmp,transid?
ur function return type is string?
plz post the calling code if possible
george4986
11-Sep-14 6:11am
View
do u want to install an exe while running ur application?
george4986
11-Sep-14 5:41am
View
change
WHERE Date >= (2014-01-01('" & FirstDate & "')) AND Date <= (2014-12-31('" & LastDate & "'))"
into
WHERE Date >= '" & FirstDate & "' AND Date <= '" & LastDate & "'"
in ur query
george4986
11-Sep-14 1:44am
View
to check date with time
george4986
11-Sep-14 0:10am
View
plz check updated solution
george4986
10-Sep-14 3:45am
View
'flist.UploadDate' declared as string/datetime?
try this
string s = Convert.ToDateTime(fl.CreationTime).ToString("yyyy-MM-dd h:mm tt").Replace('-', '/');
george4986
3-Sep-14 23:45pm
View
image on header section?
george4986
28-Aug-14 5:30am
View
what is ur expected result if u add 2.5 and 2.8?
george4986
25-Aug-14 23:37pm
View
post the table structure with data script of table 'Tb_Sch_Time_Table'
george4986
23-Aug-14 7:18am
View
consider u have an erp project on which u have added dlls for modules like hr,payroll,inventory,...so on. U can use interface class to pass(communicate) data(eg:user name,login company,location..fetched on login time) to forms in the dlls. Each forms u need to inherit the interface class ,set properties & constructor.From calling form create object of interface class and pass values(usually on calling time of each form).
george4986
23-Aug-14 6:37am
View
post ur code here
george4986
23-Aug-14 6:31am
View
Deleted
nice links +5v .Book marked ;-)
george4986
11-Aug-14 5:22am
View
try this link
http://stackoverflow.com/questions/4872946/linq-query-to-select-top-5
george4986
11-Aug-14 5:16am
View
search google for topic named 'LINQ'
george4986
11-Aug-14 0:47am
View
'Nop' is that a class name?. have u used any classes or functions of 'system.web' namespace without referencing system.web dll?
george4986
2-Jun-14 2:24am
View
use auto text in grid
george4986
31-May-14 8:15am
View
consider u have an erp project on which u have added dlls for modules like hr,payroll,inventory,...so on. U can use interface class to pass data(eg:user name,login company,location..) between forms in the dlls. Each forms u need to inherit the interface class ,set properties,constructor.From calling form create object of interface class and pass values.
george4986
15-May-14 3:29am
View
+5v niceExplanation & Example ;-)
george4986
5-May-14 7:41am
View
Deleted
from ur code<br>
byte[] bytes = rv.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamids, out warnings);<br>
<br>"<deviceinfo> <outputformat>Pdf <PageWidth>8.27in</PageWidth> <PageHeight>11.69in</PageHeight> <margintop>0.25in <marginleft>0.00in <marginright>0.00in <marginbottom>0.25in"
george4986
1-May-14 4:41am
View
if u have
similar code in ur form ,make it a function.
similar code in ur project ,make it a class.
similar code in set of projects referenced in ur application ,make it a classlibrary(dll file).
search google u will find samples.
good luck ;-)
george4986
29-Apr-14 4:29am
View
working code +5v
george4986
26-Apr-14 0:22am
View
good collection +5v
george4986
26-Apr-14 0:13am
View
you are calling display function in the next click event ,and using this query "select * from Emp_Details" you will get all employees details .then what is the use of next?
george4986
9-Apr-14 3:35am
View
post ur code here
george4986
17-Mar-14 4:34am
View
did u copied the descriptive question from ur question paper?
george4986
13-Mar-14 1:56am
View
+5v nice explanation
george4986
13-Mar-14 0:46am
View
why dont u use an auto text instead of combo box?
george4986
13-Mar-14 0:24am
View
my working code now on local machine is this
if (ClassName.StartsWith("WNHRP01BO")) {
Assembly a = Assembly.LoadFile(@"\\KS50\Query\Source Exchange\hrptest remote\WNHRP01BO.dll");
var aTypes = a.GetTypes();
Type t = aTypes.FirstOrDefault(tp => tp.FullName == BOClass && tp.GetInterface("IGetData") != null);
Type iT = aTypes.FirstOrDefault(tp => tp.Name == "IGetData" && tp.IsInterface);
object obj = Activator.CreateInstance(t);
MethodInfo MI = t.GetMethods().FirstOrDefault(m1 => m1.Name == "GetData");
var retVal = MI.Invoke(obj, new object[] { Xml, ClassName, Mode });
return retVal.ToString(); }
above code is working it lists methods in dll now am facing a problem with connection string here we use another dll for db connectivity .if businessobject is referenced from application it connects using an xml file in debug folder similarly on 3 tier it reads from the hosted path bin using another dll .the dll doesn't read from remote machine other than above setups.both dll's are part of a framework we are using and there source is not available.
thanks for ur reply.am working on it now,if u have any suggestions plz reply
george4986
13-Mar-14 0:16am
View
am using .NET3.5 and i think the keyword dynamic is .net4.0 compatable
and
code line "var aTypes = a.ExportedTypes.ToArray();"
works like below here
"var aTypes = a.GetExportedTypes().ToArray();"
george4986
11-Mar-14 7:16am
View
happy to hear it works
gud luck ;-)
george4986
11-Mar-14 6:58am
View
agent_spock ,its not the requirement
12.395->12.390 NOT 12.400
george4986
11-Mar-14 5:52am
View
value of dt is null?
george4986
11-Mar-14 5:29am
View
decimal value of 2.360 is 2.36 is it necessary to add zero?
george4986
11-Mar-14 3:33am
View
post ur code here
george4986
11-Mar-14 0:44am
View
method i am invoking is public,input value in same order and same type as string.as u suggested using construtor info how can i search the method in dll and invoke
george4986
10-Mar-14 8:00am
View
happy to hear it works
gud luck ;-)
george4986
10-Mar-14 7:57am
View
are u using any loop for sorting?if yes check iteration count
george4986
10-Mar-14 7:54am
View
sorry dropbox is blocked here ;-(
george4986
10-Mar-14 7:51am
View
I have tried below code also , shows error
string BOClass = ClassName.Split(',')[0].ToString();
Assembly a = Assembly.LoadFile(@"D:\DLL\live hrp\WNHRP01BO.dll");
var aTypes = a.GetTypes();
Type t = aTypes.FirstOrDefault(tp => tp.FullName == BOClass);
Type iT = aTypes.FirstOrDefault(tp => tp.Name=="IGetData");
object obj = (iT)Activator.CreateInstance(t);
MethodInfo MI = t.GetMethods().FirstOrDefault(m1 => m1.Name.IndexOf("GetData") > 0);
var retVal = MI.Invoke(obj, new object[] { Xml, ClassName, Mode });
george4986
10-Mar-14 7:49am
View
does the above code working?
george4986
10-Mar-14 7:01am
View
can u post the structure of datatable and required output
george4986
10-Mar-14 6:31am
View
that won't work what u suggested is in commented lines of my quetion
//////calling from referenced business object project "WNHRP01BO"
//// Type tp = Type.GetType(ClassName);
//// String retDat = (((WNHRP01BO.IGetData)Activator.CreateInstance(tp)).GetData(Xml, "", Mode));
//// return retDat;
but the dll location is on client side ,i need to load dll not as reference
george4986
10-Mar-14 6:20am
View
actually what i am trying to impliment is to replace below lines
String retDat = (((WNHRP01BO.IGetData)Activator.CreateInstance(tp)).GetData(Xml, "", Mode));
return retDat;with ur provided code
but i dont know how to specify the type of Activator.CreateInstance(tp)
as (WNHRP01BO.IGetData) while loading from dllmy code
//////i am getting class name as "WNHRP01BO.hb007001C0,WNHRP01BO"
//////BOClass =WNHRP01BO.hb007001C0
string BOClass = ClassName.Split(',')[0].ToString();
Assembly a = Assembly.LoadFile(@"D:\DLL\live hrp\WNHRP01BO.dll");
var aTypes = a.GetTypes();
Type t = aTypes.FirstOrDefault(tp => tp.FullName == BOClass);
// how to specify the type of Activator.CreateInstance(tp) as (WNHRP01BO.IGetData)
object obj = Activator.CreateInstance(t);
/////cant list GetRuntimeMethods() from type
MethodInfo MI = t.GetMethods().FirstOrDefault(m1 => m1.Name.IndexOf("GetData") > 0);
var retVal = MI.Invoke(obj, new object[] { Xml, ClassName, Mode });
////am getting value Of MI as Null
george4986
10-Mar-14 6:16am
View
whats the use of Type i in ur code?is it needed?
george4986
7-Mar-14 19:52pm
View
thanks for the reply ;-)
i will try ur solution and get back to u soon .
george4986
7-Mar-14 19:52pm
View
thanks for the reply ;-)
i will try ur solution and get back to u soon .
george4986
7-Mar-14 1:07am
View
nice explanation by the way my 5+
thanks for correcting me ;-)
george4986
7-Mar-14 1:05am
View
sorry i have checked
george4986
6-Mar-14 23:06pm
View
nice link +5v ;-)
george4986
6-Mar-14 23:05pm
View
+5v Bookmarked ;-)
george4986
6-Mar-14 22:58pm
View
post ur code here
george4986
6-Mar-14 14:01pm
View
nice comment ;-)
george4986
6-Mar-14 7:14am
View
+5v nice presentation ;-)
george4986
6-Mar-14 2:12am
View
u want requirement on front end or back end?
george4986
6-Mar-14 0:21am
View
+5v ;-)
george4986
5-Mar-14 23:22pm
View
+5v ;-)
george4986
5-Mar-14 22:43pm
View
u mean its not needed to set KeyPreview true right?
yes i have checked & updated my solution.
thanks BillWoodruff for ur valuable suggestion ;-)
george4986
5-Mar-14 15:28pm
View
+5v ;-)
george4986
5-Mar-14 7:40am
View
i think its because u r not specifying column datatype while reading from .csv files
try add columns like
table1.Columns.Add(datecolumn1,typeof(string));
george4986
5-Mar-14 7:34am
View
the same line of code is working fine when u run my previous code right?
george4986
5-Mar-14 7:31am
View
i am getting following result
BB CC
-0.146583006 -0.143250003
-0.142690003 -0.140459001
2.1 39.1
george4986
5-Mar-14 7:15am
View
i have created sample tables like urs. DONT replace ur code with code given below
copy below code to ur program and test whats the error u r getting.
DataTable dt1 = new DataTable();
dt1.Columns.Add("A");
dt1.Columns.Add("B");
dt1.Columns.Add("C");
dt1.Columns.Add("D");
DataRow dr1 = dt1.NewRow();
dr1["A"] = 1.000;
dr1["B"] = 2.000;
dr1["C"] = 3.000;
dr1["D"] = 4.000;
dt1.Rows.Add(dr1.ItemArray);
dr1["A"] = 11.000;
dr1["B"] = "BB";
dr1["C"] = 13.000;
dr1["D"] = 14.000;
dt1.Rows.Add(dr1.ItemArray);
dr1["A"] = 111.000;
dr1["B"] = "CC";
dr1["C"] = 113.000;
dr1["D"] = 114.000;
dt1.Rows.Add(dr1.ItemArray);
DataTable dt2 = new DataTable();
dt2.Columns.Add("E");
dt2.Columns.Add("BB");
dt2.Columns.Add("CC");
dt2.Columns.Add("H");
DataRow dr2 = dt2.NewRow();
dr2["E"] = 1.100;
dr2["BB"] = 2.100;
dr2["CC"] = 39.100;
dr2["H"] = 4.100;
dt2.Rows.Add(dr2.ItemArray);
dr2["E"] = 11.200;
dr2["BB"] = -0.146583006;
dr2["CC"] = -0.143250003;
dr2["H"] = 14.200;
dt2.Rows.Add(dr2.ItemArray);
dr2["E"] = 111.300;
dr2["BB"] = -0.142690003;
dr2["CC"] = -0.140459001;
dr2["H"] = 114.300;
dt2.Rows.Add(dr2.ItemArray);
DataTable dt3 = new DataTable();
DataRow dr3 = null;
string filterExp = string.Empty;
for (int i = 0; i < dt1.Rows.Count; i++)
{
string col = dt1.Rows[i]["B"].ToString();
if (dt2.Columns.Contains(col))
{
if (!dt3.Columns.Contains(col))
{
dt3.Columns.Add(col, typeof(decimal));
filterExp = filterExp + col + " asc ,";
}
for (int j = 0; j < dt2.Rows.Count; j++)
{
if (dt3.Rows.Count != dt2.Rows.Count)
{
dr3 = dt3.NewRow();
dt3.Rows.Add(dr3);
}
dt3.Rows[j][col] =Convert.ToDecimal(dt2.Rows[j][col]);
}
}
}
DataTable resultDt = dt3.Clone();
for (int m = 0; m < dt3.Columns.Count; m++)
{
DataView dv = new DataView(dt3);
dv.Sort = filterExp.Split(',')[m];
dt3 = dv.ToTable();
for (int i = 0; i < dt3.Rows.Count; i++)
{
if (resultDt.Rows.Count != dt3.Rows.Count)
{
resultDt.Rows.Add();
}
resultDt.Rows[i][m] = dt3.Rows[i][m];
}
}
check value of resultDt
george4986
5-Mar-14 7:10am
View
the above code works
george4986
5-Mar-14 6:22am
View
replace following code
DataView dv = new DataView(table3);
filterExp =filterExp.TrimEnd(',');
dv.Sort = filterExp;
table3 = dv.ToTable();
return table3;
with
DataTable resultDt = table3.Clone();
for (int m = 0; m < table3.Columns.Count; m++)
{
DataView dv = new DataView(table3);
dv.Sort = filterExp.Split(',')[m];
table3 = dv.ToTable();
for (int i = 0; i < table3.Rows.Count; i++)
{
if (resultDt.Rows.Count != table3.Rows.Count)
{
resultDt.Rows.Add();
}
resultDt.Rows[i][m] = table3.Rows[i][m];
}
}
return resultDt;
george4986
5-Mar-14 4:28am
View
try this
table3.Rows[j][col] = Convert.ToDecimal((table2.Rows[j][col]).ToString());
(don't work on string values)
george4986
5-Mar-14 4:02am
View
change
table3.Columns.Add(col, typeof(string));
to
table3.Columns.Add(col, typeof(decimal));
george4986
5-Mar-14 3:40am
View
plz check updated solution
george4986
5-Mar-14 0:57am
View
using microsofts RawPrinterHelper.SendStringToPrinter() function its possible i think
george4986
4-Mar-14 23:05pm
View
Deleted
try this
private static DataTable CompareTwoDataTable(DataTable table1, DataTable table2)
{
DataTable table3 = new DataTable();
DataRow dr = null;
for (int i = 0; i < table1.Rows.Count; i++)
{
string filterExp = string.Empty;
string col = table1.Rows[i]["Par Name"].ToString();
if (table2.Columns.Contains(col))
{
if (!table3.Columns.Contains(col))
{
table3.Columns.Add(col, typeof(string));
filterExp = filterExp+col+" asc ,";
}
for (int j = 0; j < table2.Rows.Count; j++)
{
if (table3.Rows.Count != table2.Rows.Count)
{
dr = table3.NewRow();
table3.Rows.Add(dr);
}
table3.Rows[j][col] = table2.Rows[j][col].ToString();
}
}
}
DataView dv = new DataView(table3);
filterExp =filterExp.TrimEnd(',');
dv.Sort = filterExp;
table3 = dv.ToTable();
return table3;
}
george4986
4-Mar-14 23:02pm
View
Deleted
try this
private static DataTable CompareTwoDataTable(DataTable table1, DataTable table2)
{
DataTable table3 = new DataTable();
DataRow dr = null;
for (int i = 0; i < table1.Rows.Count; i++)
{
string col = table1.Rows[i]["Par Name"].ToString();
if (table2.Columns.Contains(col))
{
if (!table3.Columns.Contains(col))
{
table3.Columns.Add(col, typeof(string));
}
for (int j = 0; j < table2.Rows.Count; j++)
{
if (table3.Rows.Count != table2.Rows.Count)
{
dr = table3.NewRow();
table3.Rows.Add(dr);
}
table3.Rows[j][col] = table2.Rows[j][col].ToString();
}
}
}
DataView dv = new DataView(table3);
string filterExp = string.Empty;
for(int k=0;k<table3.Rows.Count;k++)
{
filterExp = filterExp+table3.Columns[k].ToString()+" asc ,";
}
filterExp =filterExp.TrimEnd(',');
dv.Sort = filterExp;
table3 = dv.ToTable();
return table3;
}
george4986
4-Mar-14 23:01pm
View
Deleted
try this
private static DataTable CompareTwoDataTable(DataTable table1, DataTable table2)
{
DataTable table3 = new DataTable();
DataRow dr = null;
for (int i = 0; i < table1.Rows.Count; i++)
{
string col = table1.Rows[i]["Par Name"].ToString();
if (table2.Columns.Contains(col))
{
if (!table3.Columns.Contains(col))
{
table3.Columns.Add(col, typeof(string));
}
for (int j = 0; j < table2.Rows.Count; j++)
{
if (table3.Rows.Count != table2.Rows.Count)
{
dr = table3.NewRow();
table3.Rows.Add(dr);
}
table3.Rows[j][col] = table2.Rows[j][col].ToString();
}
}
}
DataView dv = new DataView(table3);
string filterExp = string.Empty;
for(int i=0;i<table3.Rows.Count;i++)
{
filterExp = filterExp+table3.Columns[i].ToString()+" asc ,";
}
filterExp =filterExp.TrimEnd(',');
dv.Sort = filterExp;
table3 = dv.ToTable();
return table3;
}
george4986
4-Mar-14 6:37am
View
following above steps usually solves the issue ,don't know whats happen with ur rdlc
george4986
4-Mar-14 6:02am
View
no,did u tried creating new rdlc?
george4986
4-Mar-14 5:45am
View
try
reportViewer1.Reset();
before following line
Microsoft.Reporting.WinForms.ReportDataSource rds = new Microsoft.Reporting.WinForms.ReportDataSource("AD", dt);
george4986
4-Mar-14 4:56am
View
check ur previous post and reply there
george4986
4-Mar-14 3:39am
View
copy ur .rdlc file to some other location(backup existing)
from solution explorer
1)right click rdlc file
2)select open with
3)click xml editor then click OK button
4)inside table tag check value tag
5) if it has first function remove first function
6) save and run
7)make sure u take backup before doing this
gud luck
george4986
4-Mar-14 3:07am
View
whats the content of dt?
george4986
4-Mar-14 2:31am
View
if u are running rdlc from application.startuppath
copy modified rdlc there and run again
george4986
4-Mar-14 2:26am
View
Deleted
Member 10641030112 is ur datatable has correct data?
george4986
4-Mar-14 1:49am
View
post ur code here
george4986
4-Mar-14 0:31am
View
homework ?
george4986
4-Mar-14 0:18am
View
sorry i did't explained my solution
thanks Ankur ;-) gud luck.
george4986
3-Mar-14 23:08pm
View
not much improvement ,below code save some iterations
private static DataTable CompareTwoDataTable(DataTable table1, DataTable table2)
{
DataTable table3 = new DataTable();
DataRow dr = null;
for (int i = 0; i < table1.Rows.Count; i++)
{
string col = table1.Rows[i]["Par Name"].ToString();
if (table2.Columns.Contains(col))
{
if (!table3.Columns.Contains(col))
{
table3.Columns.Add(col, typeof(string));
}
for (int j = 0; j < table2.Rows.Count; j++)
{
if (table3.Rows.Count != table2.Rows.Count)
{
dr = table3.NewRow();
table3.Rows.Add(dr);
}
table3.Rows[j][col] = table2.Rows[j][col].ToString();
}
}
}
return table3;
}
george4986
3-Mar-14 23:00pm
View
Deleted
not much improvement ,below code save some iterations
if (dt3.Rows.Count == 0)
{
for (int j = 0; j < dt2.Rows.Count; j++)
{
dr3 = dt3.NewRow();
dt3.Rows.Add(dr3);
dt3.Rows[j][col] = dt2.Rows[j][col].ToString();
}
}
else
{
for (int j = 0; j < dt2.Rows.Count; j++)
{
dt3.Rows[j][col] = dt2.Rows[j][col].ToString();
}
}
george4986
3-Mar-14 6:03am
View
are u using windows or web form
george4986
3-Mar-14 4:49am
View
use directorylisting function and below code
try
{
string[] x1 = DirectoryListing( "ftp://192.148.10.10",true,ftpUserID, ftpPassword);
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
use break point on above line,check value of x1
george4986
3-Mar-14 4:01am
View
Deleted
georgeuce@gmail.com
i will check mails mostly on sundays.try google first.
george4986
3-Mar-14 3:41am
View
happy to hear gud luck ;-)
george4986
3-Mar-14 2:39am
View
solution updated plz check
george4986
3-Mar-14 0:55am
View
server in ur firm?
Show More