15,892,537 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 Manamohan Jha (Top 46 by date)
Manamohan Jha
21-Jul-16 4:56am
View
Above link not useful for me, bcoz i ma not using this line
public DbSet<addressdetail> AddressDetails { get; set; }
my class directly execute on OnModelCreating().
And i want to do all task through repository pattern...
Manamohan Jha
17-Mar-16 5:37am
View
In which event they proper work??
Manamohan Jha
11-Mar-16 4:50am
View
How to solve this error
Manamohan Jha
11-Mar-16 4:50am
View
Now getting New error :-
Exception has been thrown by the target of an invocation
Manamohan Jha
11-Mar-16 3:08am
View
Problem in condition on DoWord Event...
condition is :- CmbSrch(layoutControl5.Controls, "cmbhp").Length > 0
Code Is:-
public string CmbSrch(Control.ControlCollection cc, string txt)
{
string str = "";
int z = 1;
foreach (Control ctrl in cc)
{
string _cmb = txt + z.ToString();
ComboBox cmb = ctrl as ComboBox;
if (cmb != null && cmb.Name == _cmb)
{
if (cmb.Text.Trim() != "")
{
if (cmb.Name == "cmbhp1")
{
if (cmb.Text == "Low")
str += string.Format("txt{0} < '0.8' AND ", z.ToString());
if (cmb.Text == "High")
str += string.Format("txt{0} > '7.6' AND ", z.ToString());
if (cmb.Text == "Normal")
str += string.Format("txt{0} >= '0.8' AND txt{0} <= '7.6' AND ", z.ToString());
}
else
str += string.Format("txt{0}='" + cmb.Text + "' AND ", z.ToString());
}
z++;
}
}
if (str != "")
return str = str.Substring(0, str.Length - 4);
else
return "";
}
Thsi code accessing from outside of DOWork
Error is:-
Cross thread operation not valid : control 'cmbhp1' accessed from a thread other than the thread it was created on
Manamohan Jha
11-Mar-16 2:16am
View
Cross thread error show every time...
Manamohan Jha
8-Mar-16 6:07am
View
yes, this class for EF
Manamohan Jha
19-Jun-15 10:30am
View
var query = hp.ReadCSV(filepath).AsEnumerable()
.Where(r => r.Field<string>("Column1").Contains("xyz"))
.Where(r => (r.Field<string>("Column2") == "ON") || (r.Field<string>("Column2") == "OFF"))
.GroupBy(r => new { DDate = r.Field<string>("Column0"), Type = r.Field<string>("Column1") })
.Select((g, i) => new
{
SrNo = i += 1,
DDate = DateTime.Parse(g.Key.DDate).ToString("dd/MM/yyyy"),
OnTime = g.Where(c => c.Field<string>("Column2") == "ON").Select(c => DateTime.Parse(c.Field<string>("Column0")).ToString("HH:mm:ss")).FirstOrDefault(),
OffTime = g.Where(c => c.Field<string>("Column2") == "OFF").Select(c => DateTime.Parse(c.Field<string>("Column0")).ToString("HH:mm:ss")).FirstOrDefault(),
}).ToArray();
this query work but Off time show in second row
how to correct it??
Manamohan Jha
19-Jun-15 10:28am
View
it didn't work in my case...
Manamohan Jha
19-Jun-15 5:58am
View
i think Group wish with date field not correct
Some time xyz "ON" and "Off" same time
Manamohan Jha
19-Jun-15 5:57am
View
i m not getting correct result
Query:-
var qry = MyDataTable.AsEnumerable()
.Where(r => r.Field<string>("Column1").Contains("xyz"))
.Where(r => (r.Field<string>("Column2") == "ON") || (r.Field<string>("Column2") == "OFF"))
.GroupBy(r => new { DDate = r.Field<string>("Column0") })
.Select((g, i) => new
{
SrNo = i += 1,
DDate = g.Key.DDate,
OnTime = g.Where(c => c.Field<string>("Column2").Contains("ON")).Select(c => Convert.ToDateTime(c.Field<string>("Column0"))).FirstOrDefault(),
OffTime = g.Where(c => c.Field<string>("Column2").Contains("OFF")).Select(c => Convert.ToDateTime(c.Field<string>("Column0"))).LastOrDefault()
});
Manamohan Jha
19-Jun-15 5:50am
View
i am not storing dates as string, i am getting all data from CSV file
public DataTable ReadCSV(string filepath)
{
DataTable dtDataSource = new DataTable();
string[] fileContent = File.ReadAllLines(filepath);
if (fileContent.Length > 0)
{
string[] columns = fileContent[0].TrimEnd(',').Split(',');
for (int i = 0; i < columns.Length; i++)
{
dtDataSource.Columns.Add("Column" + i);
}
//
for (int i = 0; i < fileContent.Length; i++)
{
string[] rowData = fileContent[i].TrimEnd(',').Split(',');
dtDataSource.Rows.Add(rowData);
}
}
return dtDataSource;
}
Manamohan Jha
19-Jun-15 3:45am
View
i want only "xyz" data...
Column0 | Column1 | Column2
04/05/2015 00:10 | xyz | ON
04/05/2015 00:20 | xyz | OFF
04/05/2015 00:30 | xyz | ON
04/05/2015 00:40 | xyz | OFF
04/05/2015 00:50 | xyz | ON
04/05/2015 00:60 | xyz | OFF
04/05/2015 00:70 | xyz | ON
04/05/2015 00:80 | xyz | OFF
Manamohan Jha
14-Feb-15 4:53am
View
reporting purpose..
Manamohan Jha
13-Feb-15 2:11am
View
DsData dd = new DsData();
da.Fill(dd, "DtRcd");//DtRcd Added in DsDara
Show Exception :- ConstraintException
Ex Message :- Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
dd.EnforceConstraints = false;
After use this no exception but no value show
Manamohan Jha
12-Feb-15 1:55am
View
Without RectangleF it is ok
but in RectangleF how???
Manamohan Jha
1-Dec-14 10:52am
View
how print without make default printer???
Manamohan Jha
10-Jul-14 10:21am
View
I get when i run mypro.exe (mypro.exe is a calculator program developed by me)
The application failed to initialize properly 0xc000007B
Click on ok to terminate the application.
Manamohan Jha
27-May-14 12:39pm
View
How to solve by simple query????/
Manamohan Jha
22-May-14 2:32am
View
Give me any idea to get location???
Manamohan Jha
22-May-14 2:32am
View
How to know location using Ip address???
Manamohan Jha
20-May-14 12:08pm
View
I am using this query in my windows application
how to set textbox in Null place???
Manamohan Jha
13-May-14 6:46am
View
I know this idea, its to long
Please give me short idea???
Manamohan Jha
13-May-14 6:30am
View
Query not working with Access Databse???
Manamohan Jha
13-May-14 6:29am
View
how to set "is null" on runtime???
Manamohan Jha
2-May-14 4:07am
View
By Code...
e.graphics.drawstring()
Manamohan Jha
2-May-14 2:29am
View
How can i read the file name and size while sending it in a Flash drive(by using USB port).
Manamohan Jha
1-May-14 11:58am
View
if i use this query "SELECT REPLACE(stu_id, 'S', '') as Id from tb_stu" with connection code they return nothing<br>
<br>
if execute in access database then they return value<br>
<br>
Why???
Manamohan Jha
1-May-14 7:04am
View
date wise report print
print date report
after print each date
then print total no of data in date
then next date report print
Manamohan Jha
1-May-14 5:10am
View
No..
Thanks Sir
Manamohan Jha
1-May-14 4:28am
View
Okey, Sorry Sir
I want solution for both db(Sql or Access)
Manamohan Jha
1-May-14 4:09am
View
substring is not working in access database
Manamohan Jha
1-May-14 3:55am
View
Ya i know that,
max only return max number not with string
Give me any idea to get max value with string???
Manamohan Jha
1-May-14 2:48am
View
i think replace is better idea
Manamohan Jha
1-May-14 2:45am
View
How to short correct
Access and sql db
Manamohan Jha
29-Apr-14 13:04pm
View
I cant change column datatype
becoze user both type id enter on strting
So how to convert string to number
it is possible in sql
but i dont know in access
so plz help me on access database???
Manamohan Jha
29-Apr-14 13:01pm
View
It is possible using Hook
Hook to kernel.dll
But how???
Manamohan Jha
29-Apr-14 12:55pm
View
I want this for receipt no generation
Manamohan Jha
29-Apr-14 12:33pm
View
Solved
Its extra space problem
Thanks Sir For help
Manamohan Jha
29-Apr-14 12:15pm
View
Yes i replaced,
see my above code
Manamohan Jha
29-Apr-14 11:57am
View
public List<string> FeeMonth(string id)
{
string[] value = null;
var monthList = new List<string>();
//
value = MlistReceiptWise(id).Split(char_).OrderBy(s => DateTime.ParseExact(s, "MMMM-yy", CultureInfo.CurrentCulture)).ToArray();
//
for (int i = 0; i < value.Length - 1; i++)
{
monthList.Add(value[i]);
}
//
return monthList;
}
MlistReceiptWise(id) return All Months like March-14,April-13 etc
then why show Format Exception
>>> String was not recognized as a valid DateTime.
Manamohan Jha
29-Apr-14 11:44am
View
what is "S"???
Manamohan Jha
29-Apr-14 11:20am
View
how to return in list
one by one
Manamohan Jha
29-Apr-14 10:49am
View
Problem detect in this code
1st:- 'string.Join(string, string[])' has some invalid arguments
2nd:- cannot convert from 'System.Linq.IOrderedEnumerable<string>' to 'string[]'
Manamohan Jha
29-Apr-14 10:47am
View
i have string valiable
string str=Jan-14,Apr-13,Feb-14,May-13,Mar-14,Nov-13,Oct-13,Jun-13,Sep-13,Aug-13,Dec-13,Jul-13 in database column
i want to show in list
like this
Apr-13
May-13
Jun-13
Jul-13
Aug-13
Sep-13
Oct-13
Nov-13
Dec-13
Jan-14
Feb-14
Mar-14
How???
Manamohan Jha
29-Oct-13 12:59pm
View
| Name | Type | SubType |
-----------------------------
| A | X | X1 |
| A | Y | Y1 |
| A | Z | Z1 |
| B | P | P1 |
| B | Q | Q1 |
| B | R | R1 |
How to show like this...
| Name | Type | SubType |
-----------------------------
| A | X | X1 |
| | Y | Y1 |
| | Z | Z1 |
| B | P | P1 |
| | Q | Q1 |
| | R | R1 |
Show More