15,885,985 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 _Starbug_ (Top 157 by date)
_Starbug_
25-Feb-20 8:36am
View
this link is good. my need is a file that there is "small_margin_value" "big_margin_value" "small_padding_value" "big_padding_value" "button_corners_small" "button_corners_big" "recyclerview_items_margin_top" and other things like that about size and width. a sample file would be very helpful and can give me a view about this section. Thanks again
_Starbug_
8-Feb-20 5:31am
View
@Richard-MacCutchan : i understand the question type. i have no problem with creating class or methods. but some of my codes are in activity. for example i used btn.setvisibility(View.Visible) inside other views click. and they say your codes are not modular. they say some part of code not all.
_Starbug_
8-Feb-20 1:36am
View
thanks for your response Gerry Schmitz. it is not clear enough for me.
_Starbug_
16-Feb-19 8:22am
View
@Stephen Hewison: can you please help me with this form http://www.shenel.ml
_Starbug_
30-Jul-18 3:04am
View
error is in init2() method.and in line58.
_Starbug_
19-Aug-15 11:10am
View
Thanks for answer. do you have any other way for implement this without socket(through webclient or something else)?
_Starbug_
19-Aug-15 10:58am
View
in fact i do not can do any thing with server. and i have not any access to server. why i hide my end. i want to use MTProto protocol of telegram. and telegram gaved me an ipaddress with a port address. and i want to have communicate with this server.:D
_Starbug_
8-Jan-15 15:41pm
View
after this codes i try to store imag in database. but it is only 13 bytes.
_Starbug_
8-Jan-15 15:40pm
View
i am using this. do you think this is incorrect way?
System.Drawing.Image imag = System.Drawing.Image.FromStream(FileUpload1.PostedFile.InputStream);
byte[] Image = null;
Image = new byte[FileUpload1.PostedFile.ContentLength];
HttpPostedFile UploadedImage = FileUpload1.PostedFile;
UploadedImage.InputStream.Read(Image, 0, (int)FileUpload1.PostedFile.ContentLength);
_Starbug_
8-Jan-15 15:39pm
View
how can i do this sir.
_Starbug_
8-Jan-15 15:39pm
View
i can store data but it is only 13 bytes.
_Starbug_
30-Dec-14 7:20am
View
thanks for your answer. but what type of control i must use for image. where i must choose image(from HTML control or from Standard control). when i drag image from standard controls of toolbox this image does not have any src property but image from HTML has src property but i can not accept it in my codes. how can i do this? thanks.
_Starbug_
4-Oct-14 7:58am
View
that means when i place phone camera in front of QR Code, nothing happen. and application do not read any thing.i tested this that when my text is in english, application can read it's value and show it to me but in persian it do not show any information. i must say that i generate this QR Codes(persian and english) with ZXing Library in eclipse.
_Starbug_
3-Oct-14 17:44pm
View
when i enter a text in persian language, my mobile app can not read generated QRCode and when i my text is in english my application can fetch text from QRCode. what is wrong with my code and what i must do?
thanks.
_Starbug_
3-Oct-14 17:16pm
View
and another problem is that i can use zxing library to create QRCode. but when i want to decode this QRCodes my QRCode Application that i installed in my android phone can not read(Decode) this QRCodes. what is the problem you think?
_Starbug_
3-Oct-14 17:12pm
View
thanks.if i have for example 10 column in a table and they have value, can i store them in QR Code?
_Starbug_
28-Aug-14 9:39am
View
that link is not useful
_Starbug_
28-Aug-14 9:15am
View
i want just pass one parameter to crystal report. i just need 1 or 2 line of code.
_Starbug_
28-Aug-14 8:36am
View
yes i added. and instead of parameter name i now use index. when crystal report is loading a page appear and want parameter value.
this is my code.
objRpt.SetParameterValue(0, (object)label16.Text);
when crystal report load. first a page appear and want to add a value for my parameter. what is wrong and how i can add value for parameter without entering value in this page?thanks.
_Starbug_
28-Aug-14 6:28am
View
thanks but an error occur and say that
invalid index. (Exception from HRESULT:0x8002000B(DISP_E_BADINDEX))
_Starbug_
21-Aug-14 7:16am
View
thanks again.do you have download link of sqlexpress 2008 R2?
_Starbug_
21-Aug-14 7:10am
View
thank you. can database version affect the connection. i created this database with sql 2008 r2(661). but i think probably my express sql is 2008(655). please explain about this.
thanks.
_Starbug_
21-Aug-14 7:06am
View
it is ReminderDatabase
_Starbug_
21-Aug-14 7:01am
View
yes i can.
_Starbug_
21-Aug-14 6:51am
View
i can not understand what you are saying.reach?
_Starbug_
12-Aug-14 5:04am
View
i understand your answer. but a problem that i have is-->for example we have a text file with 3 line of text on it.in first line we have "Sony" in second line we have "Sunday" and in third line we have "Sunday" too.and we use first "Sunday" for some work. and second "Sunday" for other thing.and for this time they are same.i want to know how can i just change first "Sunday".
i do not know how to solve this problem.
_Starbug_
10-Aug-14 7:10am
View
h just need a class to compute the size of received and sent data.do you know a class for this?i say this.
_Starbug_
10-Aug-14 6:58am
View
:D from where i must begin?
just i do not know about the class for receiving and sending data.
_Starbug_
8-Aug-14 5:26am
View
if i want to add other sql query result to this text file and second query result come after first query.how can i do that.
_Starbug_
8-Aug-14 5:25am
View
Deleted
if i want to add other sql query result to this text file and second query result come after first query.how can i do that.
_Starbug_
8-Aug-14 5:04am
View
thanks friend.it works fine.
_Starbug_
7-Aug-14 15:30pm
View
thanks
_Starbug_
7-Aug-14 13:48pm
View
i solved this problem my self. i want to see if the connection is open then send my file instead of send file and see that there is not any open connection. first way is smarter.
_Starbug_
7-Aug-14 13:48pm
View
Deleted
i solved this problem my self. i want to see if the connection is open then send my file instead of send file and see that there is not any open connection. first way is smarter.
_Starbug_
7-Aug-14 11:43am
View
this is very good answer that i see. boy first of all read question carefully after that answer it. i want to check internet connection status.i want to know i connected to the internet or not.
_Starbug_
7-Aug-14 11:32am
View
good things for knowing.thanks.
_Starbug_
6-Aug-14 17:03pm
View
thanks for answer.but stack frame show me "external code".
_Starbug_
6-Aug-14 15:15pm
View
my project is windows form.and every user has his own database.
i want to know with this connection string i do not face with any problem?some suggestions i need
connection string-->public string constring = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ReminderDatabase.mdf;Integrated Security=True;User Instance=True";
_Starbug_
6-Aug-14 14:19pm
View
if i detach database file and use above connection string for communicate with database.may be there a problem or it is enough?
_Starbug_
6-Aug-14 14:15pm
View
thank you sir.but i do not know how to catch exception by logging.need help.
_Starbug_
6-Aug-14 13:48pm
View
visual studio does not show the location of error.just show the window that i uploaded.
_Starbug_
6-Aug-14 13:42pm
View
thanks friend.
_Starbug_
6-Aug-14 13:14pm
View
this is call stack window and other things may help.
http://upload7.ir/imgs/2014-08/05349630189301818351.jpg
_Starbug_
6-Aug-14 13:06pm
View
thanks.
_Starbug_
6-Aug-14 13:03pm
View
thank for your answer.i do what you said and in last line of output window this text was.
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><description>Unhandled exception<appdomain>NotifyMe.vshost.exe<exception><exceptiontype>System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089<message>Object reference not set to an instance of an object.<stacktrace> at FreeControls.PersianDateTimePicker.Finalize()<exceptionstring>System.NullReferenceException: Object reference not set to an instance of an object.
at FreeControls.PersianDateTimePicker.Finalize()</TraceRecord>
_Starbug_
6-Aug-14 12:37pm
View
sir this is a link of a picture about error that happen suddenly. i do not know how to correct it.
http://upload7.ir/imgs/2014-08/91406554049784590062.jpg
_Starbug_
6-Aug-14 11:43am
View
thannks alot my friend. your advises clear many thing for me. thanks again
_Starbug_
6-Aug-14 10:57am
View
i solved it myself. sir i want time that it is less than now. for that i must know the value of this year and value of this month. i fetched this value from mydatetime class.
thank you.
_Starbug_
6-Aug-14 3:59am
View
i done it.
_Starbug_
6-Aug-14 3:30am
View
i know this error is because of above code. if i solve datagridview problem. ican solve automatically
_Starbug_
5-Aug-14 16:15pm
View
absolutely
_Starbug_
5-Aug-14 16:10pm
View
i believe for some programs it is good.
_Starbug_
5-Aug-14 14:37pm
View
think about the time that user work with antivirus program. when he click on close button the program must not closed because it is important program in computer.
_Starbug_
5-Aug-14 14:00pm
View
i think your word is correct for professional users and computer mans. but for the users that they are amateur and are begginner it can be good idea. because they do not know the importance of program.
_Starbug_
5-Aug-14 14:00pm
View
Deleted
i think your word is correct for professional users and computer mans. but for the users that they are not amateur and are begginner it can be good idea. because they do not know the importance of program.
_Starbug_
5-Aug-14 8:26am
View
thank's friend.it was good answer.that problem solved.i want a code that show me months that are in past. in the other word i want months that are early than this month that we are in it.what i must do?
thanks again.
_Starbug_
4-Aug-14 2:01am
View
it is for windows form.
no you think correct sir. i want to header width can increase or decrease with the text of it. when the text of header is long,width of header increace and viseversa.
_Starbug_
27-Jul-14 12:45pm
View
i mean what is the average of a internet shop. an internet shop that in it user can buy some objects with a few facilities.like roll back buyed object,comparison object with each other and else.
thank if you give some good information.
_Starbug_
27-Jul-14 5:16am
View
is there any need to know designing softwares or this technologys are enough?
_Starbug_
27-Jul-14 4:48am
View
thanks friend. i want to know its minimum and maximum price. just for knowing
_Starbug_
20-Jul-14 14:53pm
View
thanks friend.nice ideas.
_Starbug_
19-Jul-14 13:22pm
View
what class i must use for doing this? what methods?
_Starbug_
19-Jul-14 11:04am
View
that is correct.how can i do this programatically
_Starbug_
3-Jul-14 11:33am
View
thanks.good idea.
_Starbug_
17-May-14 8:41am
View
what is the meaning of +5?
_Starbug_
10-May-14 13:01pm
View
yes i solved this myself.
_Starbug_
9-May-14 16:57pm
View
how you use execlp function to execute a new program. please place a simple complete code.
_Starbug_
9-May-14 16:54pm
View
i placed a / in there but this code do not execute my program.
_Starbug_
9-May-14 16:52pm
View
what this mean? please answer. i need it.
_Starbug_
9-May-14 16:02pm
View
still i have a problem in using it.
_Starbug_
9-May-14 15:29pm
View
still have problem when using it.
_Starbug_
9-May-14 9:18am
View
congratulations. you have more than 1 mega points.congratulation my friend.
_Starbug_
9-May-14 8:54am
View
thanks
_Starbug_
9-May-14 7:52am
View
in fact it is not actual. can be change.you can change it. i say this words from your words and virtual keyword itself.
_Starbug_
9-May-14 7:39am
View
thanks. can you explain a bit about virtual keyword?i do not know anything about it.
_Starbug_
9-May-14 7:36am
View
i founded it myself. thank you
_Starbug_
9-May-14 7:24am
View
no sir. you do not understand me.i am not a beginner in programming. i want the structure of Next(int,int) function of it. it generate a random number between min value and max value of parameters. but how it do this? what is the code for doing this? developers of next function what code places in the behind of next() function. i want this?
_Starbug_
9-May-14 7:23am
View
great persian read question carefully.
_Starbug_
9-May-14 7:23am
View
Deleted
no sir. you do not understand me.i am not a beginner in programming. i want the structure of Next(int,int) function of it. it generate a random number between min value and max value of parameters. but how it do this? what is the code for doing this? developers of next function what code places in the behind of next() function. i want this?
_Starbug_
9-May-14 7:13am
View
thanks my friend for your helping
_Starbug_
9-May-14 4:44am
View
yes but i do not understand it.
_Starbug_
7-May-14 14:44pm
View
i asked this question for my problem in inside my program when i want to fetch almost 500 rows data from database that it takes more than 5 seconds and i want to show a message or a form for user that the data is fetching or something like this.
_Starbug_
7-May-14 14:21pm
View
both of main window loading and other forms inside the program.
_Starbug_
6-May-14 13:02pm
View
how can i change the color of a rows?
_Starbug_
6-May-14 13:01pm
View
thanks
_Starbug_
27-Apr-14 17:33pm
View
sorry. you are right. i do not read your question carefully.you can set for your customer id field identity increment and identity seed. sorry again.
_Starbug_
26-Apr-14 8:15am
View
thank you friend.
_Starbug_
23-Apr-14 5:17am
View
thank you.my table name in datast.xsd was different with what i am get in sqldataadapter. after correcting this probleem it works fine.
_Starbug_
20-Apr-14 5:20am
View
the crystalreportviewer does not show any information.you think what can be the problem?
_Starbug_
19-Apr-14 4:41am
View
full extracted query?what is it? and where i must write it?
_Starbug_
19-Apr-14 3:07am
View
i tested this but it is not answering. when i use "select * from OmdeSell_Table" that must answer.i think the problem is not from query. i think every thing is correct until line 12.because in line 11 message box show us number of rows affected. i think the problem is with crystal report or crystal report viewer.
_Starbug_
18-Apr-14 17:31pm
View
first i added a crystal report to my project. then i select using wizard option for it then i select dataset1 as dataset from my project data(dataset has a datatable with 12 column) for it. and i do not added any information about sub report of group for it.
i added dataset1 for it. when i execute the code in the messagebox count of rows for my query are shown for example 320.
_Starbug_
18-Apr-14 5:14am
View
that is not good words. thank you.
_Starbug_
5-Apr-14 9:34am
View
i do not know what you mean but i want to this software can run in customer computer and user(customer) can access to database(every thing created in software) like insert update and delete commands in database file.
_Starbug_
5-Apr-14 9:21am
View
thank you. but i am developing windows application not a web application. my problem is this.
1.what connection string i must use?
2.where i must place mdf and ldf files of database
3.what other thing i must do
_Starbug_
1-Apr-14 13:04pm
View
because i think in this location people have more experience in programming they can let me have a good decide about my software.
thanks.
_Starbug_
26-Mar-14 4:27am
View
thank you.solved
_Starbug_
26-Mar-14 4:04am
View
i checked it.it set to none. but again it closes.
_Starbug_
26-Mar-14 4:00am
View
i before use them but now they are commented.and i tested and see that it close again
_Starbug_
25-Mar-14 11:45am
View
i must say that when user clicks in button1. 2 state it has . in fact 2 if statement we have in this event .like boolean if one of them be true,another be false. and after some actions a messagebox with 2 button(yes and no) appear and user must select one of them and continue of it
_Starbug_
25-Mar-14 11:31am
View
i think this is last part of code
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
try
{
con0.Open();
FOROSH_TYPE = comboBox3.Text;
comboBox3.Enabled = false;
CUSTOMER_NAME = comboBox2.Text;
comboBox2.Enabled = false;
SqlCommand com2 = new SqlCommand("insert into OmdeSell_Table(Kala_Name,Tedad_Asli,Tedad_Far_ee,Tedad_Dar_Tedad_Faree,Size_Kala,"
+ "Customer_Name,Forosh_Type,Geymat_Forosh,Sode_Khales,Kala_Zamane_Forosh,Shomare_Factor,Radif) values (N'" + comboBox1.Text + "','" + TEDAD_ASLI.ToString() + "','" + (TEDAD_FAREE - Int32.Parse(textBox2.Text)).ToString() + "','" + TEDAD_DAR_TEDAD_FAREE.ToString() + "','" + (KALA_SIZE - Int32.Parse(textBox3.Text)).ToString() + "',N'" + CUSTOMER_NAME + "',N'" + FOROSH_TYPE + "','" + KALA_FOROSH.ToString() + "','" + KALA_SOD.ToString() + "',GETDATE(),'" + SHOMARE_FACTOR + "','" + RADIF.ToString() + "')", con0);
com2.ExecuteNonQuery();
MessageBox.Show("اطلاعات انبار به روز شد");
MessageBox.Show("کالای مورد نظر به فاکتور فروش اضافه شد.آیا می خواهید کالای دیگری به این لیست اضافه کنید؟", "", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
if (DialogResult == DialogResult.Yes)
{
con0.Close();
con0.Dispose();
com2.Dispose();
button2.Text = "خروج";
label8.ForeColor = Color.DarkGreen;
label8.Text = "کالا با موفقیت به فاکتور اضافه شد";
}
else if (DialogResult == DialogResult.No)
{
con0.Close();
com2.Dispose();
if (FOROSH_TYPE == "چک")
{
MessageBox.Show("کاربر گرامی نوع فروش محصولات به صورت چک انتخاب شده است.لطفا اطلاعات چک را در قسمت های مربوطه وارد نمایید ");
AddChek ac0 = new AddChek();
ac0.ShowDialog();
this.Close();
}
else if (FOROSH_TYPE == "نقدی")
{
MessageBox.Show("اطلاعات با موفقیت ثبت شد");
this.Close();
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
_Starbug_
25-Mar-14 11:28am
View
that seems all data does not copied
if (DialogResult == DialogResult.Yes)
{
con0.Close();
con0.Dispose();
com2.Dispose();
button2.Text = "خروج";
label8.ForeColor = Color.DarkGreen;
label8.Text = "کالا با موفقیت به فاکتور اضافه شد";
}
else if (DialogResult == DialogResult.No)
{
con0.Close();
con0.Dispose();
com2.Dispose();
if (FOROSH_TYPE == "چک")
{
MessageBox.Show("کاربر گرامی نوع فروش محصولات به صورت چک انتخاب شده است.لطفا اطلاعات چک را در قسمت های مربوطه وارد نمایید ");
AddChek ac0 = new AddChek();
ac0.ShowDialog();
this.Close();
}
else if (FOROSH_TYPE == "نقدی")
{
MessageBox.Show("اطلاعات با موفقیت ثبت شد");
MessageBox.Show("این فرم در حال بسته شدن است");
this.Close();
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
if (textBox3.Text != "NULL")//استفاده از اندازه کالا
{
/////
SqlConnection con0 = new SqlConnection(constring);
try
{
con0.Open();
SqlCommand com0 = new SqlCommand("select * from Kala_Table where Kala_Name=N'" + comboBox1.Text + "'", con0);
SqlDataReader dr1 = com0.ExecuteReader();
dr1.Read();
TEDAD_ASLI = Int32.Parse(dr1["Kala_Tedad_Asli"].ToString());
KALA_SIZE = Int32.Parse(dr1["Kala_Size"].ToString());
TEDAD_FAREE = Int32.Parse(dr1["Kala_Tedad_Far_ee"].ToString());
KALA_GHEYMAT_FOROSH = Int32.Parse(dr1["Kala_Sell_Price_to_Customer"].ToString());
GHEYMAT_KHARID = Int32.Parse(dr1["Kala_Buy_Price_from_Factory"].ToString());
TEDAD_DAR_TEDAD_FAREE = Int32.Parse(dr1["Kala_Tedad_Dar_Tedade_Far_ee"].ToString());
KALA_FOROSH = (double)(((TEDAD_FAREE - Int32.Parse(textBox2.Text)) * (TEDAD_DAR_TEDAD_FAREE)) + (KALA_SIZE - (Int32.Parse(textBox3.Text))) * (KALA_GHEYMAT_FOROSH));
KALA_SOD = (double)(((TEDAD_FAREE - Int32.Parse(textBox2.Text)) * (TEDAD_DAR_TEDAD_FAREE)) + (KALA_SIZE - (Int32.Parse(textBox3.Text))) * (KALA_GHEYMAT_FOROSH - GHEYMAT_KHARID));
KOLLE_FOROSH = KOLLE_FOROSH + KALA_FOROSH;
MessageBox.Show("قیمت کالای فروخته شده" + KALA_FOROSH.ToString() + "\nشده است");
MessageBox.Show(" سود خالص حاصل از فروش این محصول" + KALA_SOD.ToString() + "شده است");
MessageBox.Show("جمع کل فاکتور " + KOLLE_FOROSH.ToString() + " شده است");
con0.Close();
dr1.Close();
dr1.Dispose();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
///////////////////////////////////////////
try
{
con0.Open();
SqlCommand com1 = new SqlCommand("update Kala_Table set Kala_Tedad_Far_ee='" + textBox2.Text + "',Kala_Size='" + textBox3.Text + "' where Kala_Name=N'" + comboBox1.Text + "'", con0);
com1.ExecuteNonQuery();
con0.Close();
com1.Dispose();
}
catch (Exception ex
_Starbug_
25-Mar-14 11:25am
View
this is all code in my button1 click event.
RADIF = RADIF + 1;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (textBox1.Text != "NULL")//استفاده از تعداد اصلی
{
SqlConnection con0 = new SqlConnection(constring);
try
{
con0.Open();
SqlCommand com0 = new SqlCommand("select * from Kala_Table where Kala_Name=N'" + comboBox1.Text + "'", con0);
SqlDataReader dr1 = com0.ExecuteReader();
dr1.Read();
TEDAD_ASLI = Int32.Parse(dr1["Kala_Tedad_Asli"].ToString());
TEDAD_FAREE = Int32.Parse(dr1["Kala_Tedad_Far_ee"].ToString());
KALA_GHEYMAT_FOROSH = Int32.Parse(dr1["Kala_Sell_Price_to_Customer"].ToString());
GHEYMAT_KHARID = Int32.Parse(dr1["Kala_Buy_Price_from_Factory"].ToString());
TEDAD_DAR_TEDAD_FAREE = Int32.Parse(dr1["Kala_Tedad_Dar_Tedade_Far_ee"].ToString());
KALA_FOROSH = (double)(((TEDAD_FAREE - Int32.Parse(textBox2.Text)) * (TEDAD_DAR_TEDAD_FAREE)) + (TEDAD_ASLI - (Int32.Parse(textBox1.Text))) * (KALA_GHEYMAT_FOROSH));
KALA_SOD = (double)(((TEDAD_FAREE - Int32.Parse(textBox2.Text)) * (TEDAD_DAR_TEDAD_FAREE)) + (TEDAD_ASLI - (Int32.Parse(textBox1.Text))) * (KALA_GHEYMAT_FOROSH - GHEYMAT_KHARID));
KOLLE_FOROSH = KOLLE_FOROSH + KALA_FOROSH;
MessageBox.Show("قیمت کالای فروخته شده" + KALA_FOROSH.ToString() + "\nشده است");
MessageBox.Show(" سود خالص حاصل از فروش این محصول" + KALA_SOD.ToString() + "شده است");
MessageBox.Show("جمع کل فاکتور " + KOLLE_FOROSH.ToString() + " شده است");
con0.Close();
dr1.Close();
dr1.Dispose();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
///////////////////////////////////////////
try
{
con0.Open();
SqlCommand com1 = new SqlCommand("update Kala_Table set Kala_Tedad_Far_ee='" + textBox2.Text + "',Kala_Tedad_Asli='" + textBox1.Text + "' where Kala_Name=N'" + comboBox1.Text + "'", con0);
com1.ExecuteNonQuery();
con0.Close();
com1.Dispose();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
try
{
con0.Open();
FOROSH_TYPE = comboBox3.Text;
comboBox3.Enabled = false;
CUSTOMER_NAME = comboBox2.Text;
comboBox2.Enabled = false;
SqlCommand com2 = new SqlCommand("insert into OmdeSell_Table(Kala_Name,Tedad_Asli,Tedad_Far_ee,Tedad_Dar_Tedad_Faree,Size_Kala,"
+ "Customer_Name,Forosh_Type,Geymat_Forosh,Sode_Khales,Kala_Zamane_Forosh,Shomare_Factor,Radif) values (N'" + comboBox1.Text + "','" + (TEDAD_ASLI - Int32.Parse(textBox1.Text)).ToString() + "','" + (TEDAD_FAREE - Int32.Parse(textBox2.Text)).ToString() + "','" + TEDAD_DAR_TEDAD_FAREE.ToString() + "','" + KALA_SIZE.ToString() + "',N'" + CUSTOMER_NAME + "',N'" + FOROSH_TYPE + "','" + KALA_FOROSH.ToString() + "','" + KALA_SOD.ToString() + "',GETDATE(),'" + SHOMARE_FACTOR + "','" + RADIF.ToString() + "')", con0);
com2.ExecuteNonQuery();
MessageBox.Show("اطلاعات انبار به روز شد");
DialogResult = MessageBox.Show("کالای مورد نظر به فاکتور فروش اضافه شد.آیا می خواهید کالای دیگری به این لیست اضافه کنید؟", "", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
if
_Starbug_
25-Mar-14 10:50am
View
:)i am serious. i say that because it is almost 100 line in button event click and it is so complicate. and this location is not it's place.
sorry again.
_Starbug_
25-Mar-14 10:39am
View
sorry i do not think you can know many thing from my code.
_Starbug_
25-Mar-14 10:37am
View
i placed a bullet(breakpoint) in button_click and with using f10 i go front in codes but i do not see any code or any error(i have try catch in it) on it. and when debugger( i do not know that's name.maybe compiler) i mean yellow arrow goes to the end of bracket(}) form closes automatically.
_Starbug_
25-Mar-14 6:40am
View
i can write code for the time that user says "i do not want to enter any information" but i do not know what to do when he says "i want to enter more information".
if i use goto statement what i must do? because i do not have more time to edit my program structure.
_Starbug_
25-Mar-14 6:09am
View
that is correct, but when dialogresult=Yes i want to user can add some information in textboxes and he can again click the button and this cycle can continue.
_Starbug_
25-Mar-14 6:03am
View
what requirements? you mean code?
_Starbug_
25-Mar-14 5:42am
View
thank you.solved
_Starbug_
23-Mar-14 5:56am
View
so thank you my friend.
_Starbug_
23-Mar-14 4:07am
View
what is the problem in this queries. first query return value but second query does not.
first query:
select Kala_Vahed from Kala_Table where Kala_Name = 'سرپوش';
second query:
select Kala_Vahed from Kala_Table where Kala_Name = 'شیلنگ ظرفشویی';
what i must do? please help
_Starbug_
23-Mar-14 3:37am
View
i have a table with 4 rows and 10 columns. i want to select column10 when user enter column1. for some rows command executes successfully(it return column 10) but for some of them it did not. and it did not return any thing. table information is persian.
_Starbug_
23-Mar-14 3:33am
View
my table have 4 rows with 10 column. i want to select column 10 when when user enter column1. in entering some cells of column1 command execution return column10 and for some of them it did not. table information is in persian letter.
_Starbug_
19-Mar-14 12:57pm
View
thanks alot
_Starbug_
19-Mar-14 12:34pm
View
thank you my friend(OriginalGriff). i learned good things from you. one question that appear in my mind is that what i must do if my database or my customer database was corrupted and need to restore the backup file.what i must do in restore operation? and what is corrupted? database or another thing in application? thank you
_Starbug_
12-Nov-13 14:53pm
View
i know what you say. as you know ,for example for be a amateur programmer you do not need to know many thing in visual studio, you need to know what is necessary ASAP,OK. with this policy i just want to use great members experience to know what i need in the shortest time. for this reason i come here and ask my question here.
thanks for your answer.
gjmkdyttyhujk
_Starbug_
12-Nov-13 12:46pm
View
as i think code project have great members and i do not have a lot time to learn all things in udk, i asked my question, if you see my other questions you can see i am not that man you think about me. thanks for your remind.
_Starbug_
23-Apr-13 7:17am
View
sorry you right.
_Starbug_
23-Apr-13 7:00am
View
this is button click code
protected void Button1_Click1(object sender, EventArgs e)//login as website member
{
RequiredFieldValidator1.Enabled = true;
RequiredFieldValidator2.Enabled = true;
RequiredFieldValidator3.Enabled = true;
RegularExpressionValidator1.Enabled = true;
if (IsPostBack)
{
if (TextBox3.Text == Label7.Text)
{
string constring = "server=localhost;database=SanjeshOrganizationDB;Trusted_connection=true";
SqlConnection con0 = new SqlConnection(constring);
con0.Open();
SqlCommand com0 = new SqlCommand("select Username from Profile_Information where Username='" + TextBox1.Text + "' and Password='" + TextBox2.Text + "'", con0);
SqlDataReader rdr = com0.ExecuteReader();
try
{
if (rdr.HasRows)
{
rdr.Close();
Session["Username"] = com0.ExecuteScalar();
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(3));
Label8.Text = "wait...";
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(3));
Label8.ForeColor = System.Drawing.Color.Green;
Response.Redirect("MainPage.aspx");
con0.Close();
}
else
{
HyperLink1.Visible = true;
Label8.Text = "incorrect username and password";
}
}
catch
{
HyperLink1.Visible = true;
Label8.Text = "error ";
}
}
else
{
Label8.Text = "incorrect capcha code";
}
}
}
_Starbug_
23-Apr-13 6:56am
View
Deleted
no problem
_Starbug_
6-Apr-13 6:42am
View
thank you but my problem is to save finded matches to a text file.
_Starbug_
6-Apr-13 6:41am
View
my friend,my problem is just saving matches to a text file just this.i tried more time but nothing.this is my regex code and saving code. string EmailPattern2 = @"(([A-Za-z0-9\.]{3,64})@([A-Za-z0-9\.]{2,10}))"; string EmailPattern3=@"(\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)"; string tel2 = @"([1-9]{2}-[0-9]{3}-[0-9]{5})|([0-9]{2}-[0-9]{3}-[0-9]{3}\s[0-9]{2}\s[0-9]{2,10})|([0]{1}[9]{1}[1|3]{1}[0-9]{8})|(\+[0-9]{2,3}[0-9]{10,17})"; //string twopattern = @"(([A-Za-z0-9\.]{3,64})@([A-Za-z0-9\.]{2,10}))|([1-9]{2}-[0-9]{3}-[0-9]{5})|([0-9]{2}-[0-9]{3}-[0-9]{3}\s[0-9]{2}\s[0-9]{2,10})|([0]{1}[9]{1}[1|3]{1}[0-9]{8})|(\+[0-9]{2,3}[0-9]{10,17})"; MatchCollection matchesTel = Regex.Matches(strln, tel2, RegexOptions.Multiline); MatchCollection matchesEmail = Regex.Matches(strln, EmailPattern2,RegexOptions.Multiline); label3.Text = "Emails Found :" + matchesEmail.Count+ "********" + "Telephones Found :" + matchesTel.Count + ""; MatchCollection emaq = Regex.Matches(strln, EmailPattern3); label4.Text = emaq.Count.ToString(); label7.Text = mc.Count.ToString(); File.WriteAllLines(@"C:\Users\Alcatraz\Desktop\emaphonew.txt", Regex.Split(strln, EmailPattern3)); File.WriteAllLines(@"C:\Users\Alcatraz\Desktop\Telephone.txt", Regex.Split(strln, tel2));
_Starbug_
6-Apr-13 6:31am
View
Deleted
my friend,my problem is just saving matches to a text file just this.i tried more time but nothing.this is my regex code and saving code.
string EmailPattern2 = @"(([A-Za-z0-9\.]{3,64})@([A-Za-z0-9\.]{2,10}))";
string EmailPattern3=@"(\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)";
string tel2 = @"([1-9]{2}-[0-9]{3}-[0-9]{5})|([0-9]{2}-[0-9]{3}-[0-9]{3}\s[0-9]{2}\s[0-9]{2,10})|([0]{1}[9]{1}[1|3]{1}[0-9]{8})|(\+[0-9]{2,3}[0-9]{10,17})";
//string twopattern = @"(([A-Za-z0-9\.]{3,64})@([A-Za-z0-9\.]{2,10}))|([1-9]{2}-[0-9]{3}-[0-9]{5})|([0-9]{2}-[0-9]{3}-[0-9]{3}\s[0-9]{2}\s[0-9]{2,10})|([0]{1}[9]{1}[1|3]{1}[0-9]{8})|(\+[0-9]{2,3}[0-9]{10,17})";
MatchCollection matchesTel = Regex.Matches(strln, tel2, RegexOptions.Multiline);
MatchCollection matchesEmail = Regex.Matches(strln, EmailPattern2,RegexOptions.Multiline);
label3.Text = "Emails Found :" + matchesEmail.Count+ "********" + "Telephones Found :" + matchesTel.Count + "";
MatchCollection emaq = Regex.Matches(strln, EmailPattern3);
label4.Text = emaq.Count.ToString();
label7.Text = mc.Count.ToString();
File.WriteAllLines(@"C:\Users\Alcatraz\Desktop\emaphonew.txt", Regex.Split(strln, EmailPattern3));
File.WriteAllLines(@"C:\Users\Alcatraz\Desktop\Telephone.txt", Regex.Split(strln, tel2));
_Starbug_
3-Apr-13 9:17am
View
Deleted
thank you for your answer but i am amatour in programming.
this is my login page source.what must be added to it.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Sanjesh_begin_8_farvardin.Login" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.style2
{
text-align: left;
}
.style3
{
text-align: right;
}
.style4
{
text-align: right;
height: 30px;
}
.style5
{
text-align: left;
height: 30px;
}
.style6
{
text-align: right;
width: 416px;
}
.style7
{
text-align: right;
height: 30px;
width: 416px;
}
</style>
</head>
<body style="text-align: center; height: 326px;">
<form id="form1" runat="server">
<div>
<br />
<asp:Label ID="Label5" runat="server"
style="font-weight: 700; font-family: 'B Titr'; font-size: large; font-style: italic"
Text="سازمان سنجش آموزش کشور">
<br />
<br />
<asp:Label ID="Label4" runat="server"
style="font-weight: 700; font-family: Arial, Helvetica, sans-serif"
Text="برای ورود به سایت از قسمت زیر استفاده کنید">
<br />
<br />
<table class="style2" align="center" bgcolor="#669999" frame="below"
style="background-color: #C0C0C0">
<tr>
<td class="style6" bgcolor="Silver">
</td>
<td class="style3">
<asp:TextBox ID="TextBox1" runat="server" Width="168px">
</td>
<td class="style2">
<asp:Label ID="Label1" runat="server" Text="نام کاربری"
style="font-weight: 700; font-family: Arial, Helvetica, sans-serif">
</td>
</tr>
<tr>
<td class="style7" bgcolor="Silver">
</td>
<td class="style4">
<asp:TextBox ID="TextBox2" runat="server" Width="169px">
</td>
<td class="style5">
<asp:Label ID="Label2" runat="server" Text="رمز عبور"
style="font-weight: 700; font-family: Arial, Helvetica, sans-serif">
</td>
</tr>
<tr>
<td class="style6" bgcolor="Silver">
</td>
<td class="style3">
<asp:ImageButton ID="ImageButton1" runat="server" Height="34px"
ImageUrl="~/Images_Icons/Replace_Capcha_Code.png" onclick="ImageButton1_Click"
ToolTip="تغییر کد امنیتی" Width="39px" />
<asp:Label ID="Label7" runat="server" BackColor="#3333FF" BorderColor="#CCFF33"
BorderStyle="Dotted" Font-Bold="True" Font-Italic="True"
Font-Names="Informal Roman" Height="28px" style="font-size: x-large"
Text="Capcha Code" Width="126px">
</td>
<td class="style2">
</td>
</tr>
<tr>
<td class="style6" bgcolor="Silver">
</td>
<td class="style3">
<asp:TextBox ID="TextBox3" runat="server" Width="147px">
_Starbug_
3-Apr-13 4:54am
View
thank you my friend.solved.
_Starbug_
3-Apr-13 3:59am
View
i do not know why browser do not accept new values?
_Starbug_
3-Apr-13 3:57am
View
No my friend,that code just close current connection and do not do any thing.
_Starbug_
3-Apr-13 3:38am
View
no i have not any update panel.in one page i have few textbox and a save button
_Starbug_
2-Apr-13 15:45pm
View
what is Ambiguous to you about my statement?
_Starbug_
2-Apr-13 15:28pm
View
sorry about sending my code because it is in another location that i have no internet connection.but i say abut it.in my editprofile.aspx page load event i connect to the DB and show current user information in 8 textbox(because i have 8 column in DB for users information) when i want to edit some information about user that is in textboxes i can edit but by clicking save button previous information were save in DB.is this clear?
_Starbug_
2-Apr-13 15:15pm
View
post?by pressing save changes in fact i post my code?what you mean exactly?
_Starbug_
30-Mar-13 9:53am
View
thanks alot
_Starbug_
23-Jan-13 5:39am
View
in loginsuccess.aspx when user log to website this page show to user before he go to membershomepage.aspx
_Starbug_
24-Nov-12 17:11pm
View
thank you.but i mean I can not insert a value for my first user id and when i want to add a row to my first table i enter data for all of my column's not in user id but it's value increase 2 number by seed 1000 and I want to add this new value of user id for other table that it have.is this work can done with sql automatically?
_Starbug_
17-Oct-12 3:27am
View
actually i want a implementation in c# that can search in universal tree.
_Starbug_
17-Oct-12 3:20am
View
I want an implementation of a tree in c#
_Starbug_
1-Jul-12 8:57am
View
no both da,da2 in sql server management studio returns only one record with one column.but in c# both of a,b returns null value.
_Starbug_
1-Jul-12 8:05am
View
yes.AMOZESHEMPLOYEE is a table in my database and EID,PASSWORD is a column of that
SqlCommand da=new SqlCommand("Select EID from AMOZESHEMPLOYEE WHERE EID='1001'",con1);
SqlCommand da2=new SqlCommand("Select PASSWORD from AMOZESHEMPLOYEE WHERE PASSWORD='12345'",con1);
string a = (string)da.ExecuteScalar();
string b = (string)da2.ExecuteScalar();
_Starbug_
1-Jul-12 7:19am
View
NO that was not work for me.still my string has value of null with your code and i go that link but it also do not solving my problem.
_Starbug_
28-Aug-11 8:42am
View
thank you my friend
_Starbug_
28-Aug-11 8:23am
View
I have no Precedure to save information.Iwant to enter information of some students and can save it's with access database or file or sql server.I need your help
_Starbug_
28-Aug-11 7:43am
View
thank you but when I close my program in this case I lose my information?
_Starbug_
14-Aug-11 4:52am
View
Thank you thatraja.
_Starbug_
14-Aug-11 4:40am
View
Actually.I do not think such as you.this think is not good for you
_Starbug_
14-Aug-11 4:23am
View
I just want a best pdf book that most of programmers use from that just this. and I have ASP.NET learning books in my home finally.
_Starbug_
10-Aug-11 9:56am
View
thank you solved but for your second answer your means is hyperlink?
_Starbug_
3-Aug-11 7:05am
View
in the other words I for passing from filtering first go to www.zorro.ir/s and in this websites I type my address and go to free internet how can do this with C#
_Starbug_
2-Aug-11 7:09am
View
No I do not want
_Starbug_
2-Aug-11 6:30am
View
Thank you your answer is correct but Actually I want when I run my program and write a URL in my text box first my browser open and go to the Http://www.zorro.ir/s and in this websites text box place my text box and go to that
_Starbug_
2-Aug-11 6:10am
View
can you include full code for example or a source code such as this
_Starbug_
1-Aug-11 4:15am
View
in front of my connection string do not writed any thing
_Starbug_
30-Jul-11 14:15pm
View
Thank you Espen
_Starbug_
30-Jul-11 12:39pm
View
very sorry Mr or miss OriginalGriff I can record my cars location in a notepad file but I cannot read from them tomorrow I must deliver this project to my master please help me
_Starbug_
30-Jul-11 12:14pm
View
what that mean?
_Starbug_
30-Jul-11 12:10pm
View
Deleted
Thank you very very much if I send you my game can you create reply for that?
_Starbug_
30-Jul-11 11:06am
View
sorry very much and thank you
Show More