16,004,761 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 .NET 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 mit62 (Top 111 by date)
mit62
12-Sep-21 10:53am
View
thank you for your answer. there are a lot of pages so creating one with an old name I think is not Efficient. now how and where I should create a redirect list. also what's wrong with the code in Application_BeginRequest I wrote?
mit62
11-May-18 10:33am
View
thanks for answer but my question was about which way is better for load speed because there are a lot of products
mit62
25-Apr-16 6:40am
View
Perfect. Thank you very much
mit62
29-Aug-15 14:04pm
View
thank you but if I assign a value to the string builder:
StringBuilder PortData = new StringBuilder("Initiated Value");
and then in run time I trace Portdata value in event handler, it takes data from serial port and the value of PortData will chang but at the end in this line:
txbShowFile.Text = PortData.ToString();
PortData shows this value:"Initiated Value"
mit62
29-Aug-15 9:34am
View
and about this problem you mentioned "it's a very bad idea to add a new handler every time you open the port - they do accumulate, so if you click the button twice, you will get two handlers per character received, and so on."
what can I do?
mit62
29-Aug-15 9:28am
View
when I use a breakpoint on DataReceivedHandler , the portdata gets data and everything is ok but at the end when process back to this line "txbShowFile.Text = PortData.ToString();"
portdata is null
mit62
20-Feb-15 4:37am
View
Ok. thank you all
mit62
20-Feb-15 4:30am
View
so I had to apply enabling or disabling the button in every event that grid change.is it a good way?
mit62
17-Feb-15 23:46pm
View
I declare Tables in my question, My expecting output is @result.
if all input parameters be equal with Field of two table then @result=1
mit62
15-Feb-15 14:37pm
View
I just want to know how can I access to values inside childe1.
this code was wrong:
var ms = doc.Elements("main").Elements("child1").ToList();
fields = ms.Select(s => new Class_PersonelInfo()
{
prsnlCod = s.Element("a").Value;
}
mit62
25-Sep-14 9:01am
View
thanks a lot.I didn't know about pivot tables. But I need a solution in c# and I found it.
mit62
6-Sep-14 14:18pm
View
Thanks
mit62
6-Sep-14 10:00am
View
thanks but performance of which one is better?class or datatable?
mit62
4-Aug-14 15:47pm
View
Deleted
CREATE procedure [dbo].[ReadTimingVac]
@prsnlcod nvarchar(50),
@company nvarchar(50),
@Imonth TINYINT,
@Iyear INT
AS
DEClaRE @dateID INT
DEClaRE @FK_PrsnID INT
------------------------Finding dateID-------------------------
SELECT TOP 1 @FK_PrsnID=PrsnID
FROM Key_PrsnlInfo INNER JOIN PersonelInfo ON Key_PrsnlInfo.KeyID = PersonelInfo.FK_KeyID
WHERE (Key_PrsnlInfo.PersonelCode =@prsnlcod) AND (Key_PrsnlInfo.Company = @company) AND
(Key_PrsnlInfo.ExistStatus = 1)AND (PersonelInfo.theYear <= @Iyear) AND (PersonelInfo.theMonth <=@Imonth)
ORDER BY PersonelInfo.theYear DESC, PersonelInfo.theMonth DESC
SELECT @dateID=dbo.ICardDate.dateID FROM dbo.ICardDate WHERE Imonth=@Imonth AND Iyear=@Iyear AND FK_PrsnID=@FK_PrsnID
.
.
mit62
3-Jul-14 6:23am
View
thanks a lot
mit62
29-May-14 14:50pm
View
Thanks. I changed TextChanged Function.
public static void SpiltOnThird_TextChanged(object sender, EventArgs e)
{
TextBox txb = (TextBox)sender;
int caretIndex = txb.SelectionStart;
txb.Text=numberSpiltOnThird(txb.Text);
txb.Select(caretIndex, 0);
}
mit62
10-May-14 10:59am
View
thanks for your reply.I have another question, how can I send this list of object to a Stored Procedure?
mit62
10-May-14 2:31am
View
Deleted
nowhere in "theFont" class. the error happen on Program.cs (my application is windows form)
mit62
10-May-14 2:30am
View
no error in "theFont" class.But just if I use this code
foreach (Control cx in this.Controls)
cx.Font = theFont.CargoPrivateFontCollection(9f, FontStyle.Regular);
in more than one of User controls this error happen.
(plus I have some problem on this foreach loop,because it dosn't select all controls in UserConrol)
mit62
10-May-14 1:44am
View
I read these articles and changed my program.please tell me if it's correct.
bool statusFlag=true;
using (TransactionScope scope = new TransactionScope())
{
foreach (var loan in _loanlist)
{
if (!pda.InsertLoan(new Loan{
prsnlcd = prsncod,
LoanCode = loan.LoanCode,
LoanStatus = loan.LoanAmountRemain == 0 ? true : false}))
{
statusFlag=false;
break;
}
}
if(statusFlag=true)
scope.Complete();
}
mit62
10-May-14 1:14am
View
Thanks for your reply.in my solution I embed font to resources too.
mit62
10-May-14 1:12am
View
in Program.cs file on Application.run
mit62
9-May-14 8:27am
View
don't know anyone?
mit62
22-Apr-14 12:24pm
View
I want Give this permission programatically.
(I changed my code for mdf ldf location)
mit62
19-Apr-14 8:47am
View
no,I do debug and ListOfObject has two different item but result in report shows first of them.
mit62
16-Apr-14 12:15pm
View
Deleted
sorry I correct my code.I changed scenario and I want enter key do this.
mit62
16-Apr-14 12:02pm
View
Modify the comment. Deleted
I tried to handle tab key on last control inside tab1. but it doesn't work.
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Enter)
{
if (this.ActiveControl.TabIndex == 2)//Control2 inside tab1
Control3.Focus();
}
return base.ProcessCmdKey(ref msg, keyData);
}
mit62
16-Apr-14 11:55am
View
Deleted
I tried to handle tab key on last control inside tab1. but it doesn't work.
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Tab)
{
if (this.ActiveControl.TabIndex == 2)//Control2 inside tab1
Control3.Focus();
}
return base.ProcessCmdKey(ref msg, keyData);
}
mit62
15-Apr-14 14:06pm
View
ok.thanks a lot
mit62
15-Apr-14 13:38pm
View
I will define this static class. then for example if there are two user control, If I change GlobalString in UC1 to "newvalue",does the value in US2 will be updated to "newvalue"?
mit62
9-Apr-14 20:55pm
View
Telerik dont reply soon.If I ask now they will reply next week.
mit62
8-Apr-14 1:30am
View
OK thanks.
mit62
7-Apr-14 9:23am
View
for example I enter "12:00" in cell1(every row every column)then immediately in cell2(every other row,every other column) I enter "12:00"the problem is DGV doesn't accept this value("12:00") but accept every other row in second cell.
mit62
6-Apr-14 0:55am
View
ok,thanks.I changed the code.
mit62
14-Mar-14 23:03pm
View
Thanks a lot
mit62
10-Mar-14 11:00am
View
tnx but,the functions in if clauses are different.
mit62
3-Mar-14 10:54am
View
Thank you :)
mit62
3-Mar-14 8:05am
View
I don't want declare variable s1 because I think declare a lot of variables will take place memory and hit performance.is there any way to avoid declaring s1 variable?
mit62
22-Feb-14 8:06am
View
Deleted
what is wrong with me?stupid?
mit62
18-Feb-14 5:10am
View
Ok,I do that :)
mit62
18-Feb-14 4:40am
View
Ok,thanks for your help,you learn me a lot,thanks
mit62
18-Feb-14 4:34am
View
sorry,for changing winform to UC is that a good way to change the form to inherit from UserControl instead of Form, then fix any compile errors?
mit62
18-Feb-14 4:02am
View
you're right
mit62
18-Feb-14 4:00am
View
Sorry,I have another question.If I put some controls on a tab page instead of form. then sometimes I must hide or show this tab for example if an event occured,how can i handle this?
using tab.hide() and tab.show() is enough? and something else,when main form will be loaded all embedded controls should be load too?doesn't make it a bad performance?
mit62
18-Feb-14 3:37am
View
thanks SA, the Speed was very low too I'll change my design thanks
mit62
18-Feb-14 3:36am
View
oh Thanks,but I'm beginner and I don't know about user controls ,I'll change my design.thanks again
mit62
16-Feb-14 22:06pm
View
but exceptions in my if clauses are not original exception like DivideByZeroException.
my exceptions are kinda custom exceptions. for example happen when a function has error
mit62
16-Feb-14 22:01pm
View
ok thanks but this part is not clear for me.
try
{
// statements that can cause exception.
}
mit62
16-Feb-14 21:53pm
View
and how I call Catch when code in Try is wrong?
mit62
16-Feb-14 21:50pm
View
would you please tell me how write throws?
mit62
16-Feb-14 12:53pm
View
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
mit62
16-Feb-14 9:36am
View
it doesn't work
mit62
16-Feb-14 2:41am
View
well my databas is not on local server "Server=.".
plus,application run without error when I set this connection string inside my program.
public SqlConnection Sqlc = new SqlConnection("Data Source=MyServerName;
Initial Catalog=myDataBase;Integrated Security=True");
mit62
13-Feb-14 12:31pm
View
Milfje,thanks for your help. My solution is correct. the problem caused something else.sorry
mit62
12-Feb-14 6:04am
View
I did it with regular binding datatable to DGV way and the result was ok.but now I want change my columns to custom maskColumns type.I defined columns and add them to grid then I bind datatable to grid's datasource. but the result is wrong.
mit62
11-Feb-14 19:01pm
View
thanks Bill. I change my idea. I'm using TabControl.
mit62
11-Feb-14 12:16pm
View
Deleted
.
mit62
11-Feb-14 11:40am
View
but I need DataGridView :(
mit62
11-Feb-14 10:32am
View
no ToString overload. Ok,I'll improve them.thanks a lotttt Bill
mit62
11-Feb-14 10:22am
View
error is on this lines on .Resources:
this.MnuPrvndPrslInfo.Image = global::Salary.Properties.Resources.image;
where should I check if Resources class is availible?
mit62
11-Feb-14 10:12am
View
no,no
mit62
11-Feb-14 1:35am
View
cells are strings in time format:"12:22:00", I change this string to timespan for every cell
mit62
10-Feb-14 16:23pm
View
yes,Telerik on winform
mit62
10-Feb-14 13:44pm
View
you know some parts of code are repeated and I think if I can use another for loop or sth similar it will be cleaner. also if I want use for example some buttonColumns I should change cell indexes again.
mit62
10-Feb-14 13:02pm
View
Deleted
.
mit62
10-Feb-14 12:57pm
View
sorry i don't got. which part of code do you need?this is just an object initilizer and I showed codes inside of that.
RowsList.Add(new PersonelCardClass() { ...I showed the code.inside here in my questtion.... });
mit62
10-Feb-14 12:32pm
View
Yes this is work good.it hasn't any constructor
mit62
10-Feb-14 11:46am
View
ok
mit62
10-Feb-14 4:21am
View
thank you very much
mit62
9-Feb-14 23:51pm
View
Ok,I found the problem.
SELECT @empID=empID FROM EmploymentInfo WHERE FK_pID =(SELECT pID FROM PersonelInfo WHERE PersonelCode=@personelcode)
and second insert should be done first, because it is parent:
insert into ICardDate(FK_empID,Imonth,Iyear)
Values(@empID,@fk_month,@fk_year)
nsert into PersonelCard(FK_empID,FK_month,FK_year,VacationHours)
Values(@empID,@fk_month,@fk_year,@vacationhours)
mit62
8-Feb-14 11:21am
View
CREATE PROCEDURE [dbo].[InsertRowInPersonelCard]
(@personelcode varchar (50),
@fk_month int,
@fk_year bigint,
@vacationhours time(7))
as
DECALRE @empID INT
SELECT @empID=empID FROM EmploymentInfo WHERE FK_pID =(SELECT pID FROM PersonelInfo WHERE FK_pID=@personelcode)
insert into PersonelCard(FK_empID,FK_month,FK_year,VacationHours)
Values(@empID,@fk_month,@fk_year,@vacationhours)
--the same value of @empID,@fk_month,@fk_year should insert in this table too
insert into ICardDate(FK_empID,Imonth,Iyear)
Values(@empID,@fk_month,@fk_year)
GO
mit62
8-Feb-14 7:25am
View
this is not my code. this code is generated when I execute StoredProcedure
mit62
8-Feb-14 6:29am
View
query returns a minus value
DECLARE @return_value int
EXEC @return_value = [dbo].[InsertCa]
@personelcode = N'21',
@fk_month = 1,
@fk_year = 1395,
@vacationhours = '06:05:50'
SELECT 'Return Value' = @return_value
GO
Return Value:-6
mit62
8-Feb-14 6:21am
View
Deleted
Thanks, I think it's a correct answer. but query returns a minus value
DECLARE @return_value int
EXEC @return_value = [dbo].[InsertCa]
@personelcode = N'21',
@fk_month = 1,
@fk_year = 1395,
@vacationhours = '06:05:50'
SELECT 'Return Value' = @return_value
GO
Return Value:-6
mit62
8-Feb-14 6:09am
View
Deleted
.
mit62
8-Feb-14 5:44am
View
isn't question clear?
mit62
6-Feb-14 12:23pm
View
oh thanks a lot, you helped me.
mit62
6-Feb-14 11:47am
View
o yes TimeSpan
mit62
6-Feb-14 11:30am
View
No I mean origin TimeStamp. you know in this application the users store times to a monthly table in entry and exit columns for each day and just in this format hh:mm
mit62
6-Feb-14 11:12am
View
I defined a field in which represent entrance time of people to company.I want save this time in a short style "hh:mm:ss" to my sql Database.so I choosed Time(7) Data type in sql and TimeStamp Type in C# class.now I need to know How Convert time from TimeStamp to Time(7) in sql and vice versa.
mit62
6-Feb-14 10:47am
View
thnaks, but how should I Convert sql Time(7) type Data to TimeStamp?
I want Save sqldatareader["TimeDatatype"] to a TimeStamp C#Type, in this format:{"hh:mm:ss}
mit62
5-Feb-14 14:40pm
View
Oh,yes.it was Careless
mit62
5-Feb-14 14:37pm
View
I improved question
mit62
4-Feb-14 8:01am
View
thanks.in this way timecolumn in sql is TimeSpan DataType or Time(7)?
mit62
4-Feb-14 4:19am
View
I improve question
mit62
31-Jan-14 2:17am
View
AcceptReturn Multiline SuppressPress Result
False False False beep
False False True nobeep
False True False nobeep
False true True nobeep
True False False beep
True False True nobeep
True True False nobeep
True True True nobeep
mit62
31-Jan-14 1:48am
View
Deleted
thanks
mit62
31-Jan-14 1:31am
View
Deleted
thanks but I try this, but not happen.
I used this line to call backButtonClick insted of perform click, but event didnt call, what's the problem?
btnBack.Click+=new EventHandler(btnBack_Click);
------------
private void btnBack_Click(object sender, EventArgs e){...}
mit62
31-Jan-14 1:24am
View
I set MultiLine=true and it works without SuppressKeyPress = true;
I set MultiLine=false and it works again with SuppressKeyPress = true;
thanks.
mit62
30-Jan-14 11:43am
View
thanks your suggestion.
mit62
30-Jan-14 2:26am
View
if you think there is no problem so I accept.thanks
mit62
29-Jan-14 23:34pm
View
oh wonderful answer. thanks a lot, you learn me a lot.
I have a plus question.If this application be installed on server and be multi user, does static variable make problem or not?
mit62
29-Jan-14 15:29pm
View
thanks a lot. it works. but if i set my Securemethod Internal, I think its less secure because as you said other classes in assembly can access. is there a way that LoginForm inherit Mainform?(so securMethode will be protected and I think more secure than Internal)
mit62
29-Jan-14 2:14am
View
Ok. thanks
mit62
29-Jan-14 1:30am
View
thanks a lot. but I'm beginner in c#. I got the code and I understand why we should use SqlParameterCollection. but I just didn't get this line "objParamColl = objCommand.Parameters;" you know, I translate this line in my brain something like this" objCommand.Parameters=objParamColl;"
mit62
28-Jan-14 7:04am
View
I have another problem with this class:
PersonelInfoAndEmploymentInfo person = new PersonelInfoAndEmploymentInfo();
person._empinfo.jobLocation = "asdasd";
now error is: Object reference not set to an instance of an object"
mit62
27-Jan-14 15:06pm
View
oh,sorry public had been removed from "employmentInfo" class. thanks
mit62
27-Jan-14 3:21am
View
thanks.
mit62
27-Jan-14 2:53am
View
Deleted
I pictured that and you can see here: http://speedy.sh/cEPDs/err.png
mit62
1-Dec-13 10:12am
View
I remove jquery1.5.2 in Magicline part and it works with jquery1.7.2 in slider part. then I remove jquery1.1.2 from Dockmenu part but that dosnt work. now I have this:
<!-- jQuery KenBurn Slider-----------jquery1.7.2--jQuery UI 1.8.5---->
<script src="SliderRevolution/rs-plugin/js/jquery-ui.js"></script>
<script src="SliderRevolution/rs-plugin/js/jquery.js"></script>
<script src="SliderRevolution/rs-plugin/js/jquery.themepunch.plugins.min.js"></script>
<script src="SliderRevolution/rs-plugin/js/jquery.themepunch.revolution.min.js"></script>
<script src="SliderRevolution/rs-plugin/js/Slider.js"></script>
<link href="SliderRevolution/rs-plugin/css/captions.css" rel="stylesheet" />
<link href="SliderRevolution/rs-plugin/css/settings.css" rel="stylesheet" />
<link href="SliderRevolution/style.css" rel="stylesheet" />
<%------------Magicline ------------jQuery 1.5.2--------------------%>
<script src="MagicLine/js/example.js"></script>
<!-------------Dockmenu------jQuery 1.1.2---------------------------->
<script type="text/javascript" src="./dock/js/interface.js"></script>
<link href="./dock/css/style.css" rel="stylesheet" type="text/css" />
maybe I must use some code in interface.js to avoid conflicting.but I dont now how
eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? '' : e(parseInt(c / a)))......split('|'), 0, {}))
mit62
1-Dec-13 10:10am
View
Deleted
.
mit62
1-Dec-13 1:47am
View
I removed lower versions but didn't work
mit62
5-Nov-13 19:39pm
View
tnx
mit62
7-Aug-13 9:24am
View
thanks. i should use linked algorithm(http://www.queness.com/code-snippet/6523/generate-md5-hash-with-javascript ). I don't want get original input on serverside but i want use the hash value and compare it with the value in database.i dont know how hash password before send it to serverside
mit62
4-Aug-13 4:15am
View
thanks for lighten my way
mit62
2-Jun-13 4:01am
View
it works.thanks a lot.
private void button1_Click(object sender, EventArgs e)
{
int k=0;
string s = Clipboard.GetText();
string[] lines = s.Split('\n');
foreach (string line in lines)
{
if (k < list.Count)
{
list[k++].Text = line;
}
else
break;
}
}
mit62
21-May-13 5:56am
View
thanks Mohammad but it has this error:
"'openweb.info' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'openweb.info' could be found"
"openweb" is my namespace and in my sample code info is a class:
class info
{
private string _name;
public string Name { set { _name = value; } get { return _name; } }
private string _adrs;
public string Address { set { _adrs = value; } get { return _adrs; } }
}
mit62
21-May-13 3:32am
View
yes there is other buttonCulomns.
this line has error //btncol.Text = lst.Select(c => c.Name);????????
Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<string>' to 'string'
mit62
20-May-13 0:13am
View
thanks a lot
mit62
5-May-13 3:54am
View
Deleted
strange,i edit that, for first run it works. but next time i run it there was an error: Error executing child request for ~/filename.aspx
mit62
5-May-13 3:54am
View
Deleted
strange,i tried this code for first run it works. but next time run it had error:
Error executing child request for ~/filename.aspx
Show More