15,910,878 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 fatima...68 (Top 23 by date)
fatima...68
2-Nov-13 7:43am
View
thank you my friend
fatima...68
2-Nov-13 7:25am
View
win my friend
fatima...68
2-Nov-13 6:49am
View
thank you my friend phil.o its work
fatima...68
2-Nov-13 3:47am
View
hi my friend
oh my fiend thank you thank you thank you thank you thank you thank you very much
i did it and now its working thank you very very much
fatima...68
31-Oct-13 5:21am
View
CAN YOU EXPLANE MORE?
i cant understand
fatima...68
31-Oct-13 4:39am
View
yes i did this
i delete old image and insert the new image
this is my insert code
pic_count = Directory.GetFiles("c:\\OMEGA\\kaj" , "*.Bmp", SearchOption.AllDirectories).Length;
string[] fileInDir = new string [pic_count];
string[] NAM = new string[pic_count];
fileInDir = Directory.GetFiles("c:\\OMEGA\\kaj", "*.Bmp", SearchOption.TopDirectoryOnly);
int l = fileInDir.ToString().Length;
int index = 0;
for (int i = 0; i < pic_count; i++)
{
index = fileInDir[i].ToString().LastIndexOf("\\");
if (index > -1)
{
NAM[i] = fileInDir[i].ToString().Substring(index + 1);
}
IMG = Image.FromFile("c:\\OMEGA\\kaj\\" + NAM[i] + "");
byte[] data;
using (MemoryStream ms = new MemoryStream())
{
IMG.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
data = ms.ToArray();
}
picBoxUser.Image = IMG;
string num = "select SERIAL from _TRBS_PIC where SERIAL = '"+int.Parse(NAM[i].Replace(".Bmp",""))+"' ";
SqlDataAdapter dp = new SqlDataAdapter (num , sqlCnn);
DataTable tp = new DataTable ();
dp.Fill(tp);
if (tp.Rows.Count>0)
{
p_num = int.Parse(tp.Rows[0][0].ToString());
}
if (tp.Rows.Count <= 0)
{
try
{
double max;
DateTime d;
SqlCommand cmdDateTime = new SqlCommand("Select getdate() ", sqlCnn);
sqlCnn.Open();
d = DateTime.Parse(cmdDateTime.ExecuteScalar().ToString());
sqlCnn.Close();
SqlCommand cmdCount = new SqlCommand("Select Count(_ID) from _TRBS_PIC ", sqlCnn);
sqlCnn.Open();
double No = double.Parse(cmdCount.ExecuteScalar().ToString());
sqlCnn.Close();
if (No == 0) max = 1000 + StID;
else
{
SqlCommand cmdMax = new SqlCommand("Select max(_ID) from _TRBS_PIC ", sqlCnn);
sqlCnn.Open();
max = double.Parse(cmdMax.ExecuteScalar().ToString());
max = max % 1000;
max = double.Parse(cmdMax.ExecuteScalar().ToString()) - max + 1000 + StID;
sqlCnn.Close();
}
ID = max;
string strsql = "INSERT INTO _TRBS_PIC ([_ID]"
+ ",[SERIAL]"
+ ",[DATE]"
+ ",[PIC]"
+ ",[NUM]"
+ ",[DETAIL]"
+ ",[ESERIAL]"
+ ",[UID1]"
+ ",[UID2]"
+ ", [_LastSecurityOption], [_LastSaveOption], [_LastDate], [_LastTime], [_LastDateTime], [_LastUID], [_LastStID], [_LastStatus]) values ('"
+ max.ToString()
+ "','" + NAM[i].Replace(".Bmp","")
+ "','" + fieldTxt2.Text
+ "','" + picBoxUser.Image
+ "','" + pic_count
+ "',' "
+ "','0"
+ "','" + UID1.ToString()
+ "','" + UID2.ToString()
+ "','0','0','" + d.ToShortDateString().ToString() + "','" + d.ToShortTimeString().ToString() + "','" + d.ToString() + "','" + UID.ToString() +
fatima...68
31-Oct-13 1:41am
View
thanks my firiend
what do you mean
fatima...68
30-Oct-13 7:41am
View
thanks i did it and i fix my insert command but i have that error yet
fatima...68
9-Mar-13 6:24am
View
please explain more about it
thanks'
fatima...68
9-Mar-13 4:35am
View
hi my friend its easy for text box but i want it for data grid view there is no event for that
fatima...68
9-Mar-13 4:33am
View
hi my friend i want to convert a number like 4561230 to 4,561,230 as when user typing. its mean in one column of data grid view when user type the forth number last three number automatically separate from right whit ","
is it clear?
fatima...68
5-Mar-13 0:07am
View
my DB is sqlserver and solution is windows app of c# my friend
fatima...68
5-Mar-13 0:04am
View
thanks my friend
fatima...68
4-Mar-13 7:50am
View
between number and word is one space
fatima...68
4-Mar-13 7:50am
View
thanks ok
like this:
1000 time
2000 min
2000 second
3000 day
4000 week
fatima...68
3-Mar-13 0:05am
View
thanks my FRIENDS
fatima...68
26-Feb-13 6:23am
View
thanks my friend i do it and if i had a problem i will need your help
fatima...68
24-Feb-13 9:10am
View
hi my friend for example i want when im typing 15646 its outomaticaly convert to 15,646
fatima...68
24-Feb-13 9:06am
View
hi thanks yes i want it
but in grid view
i cant solve it
fatima...68
2-Oct-12 17:04pm
View
smallest and biggest number through inputting numbers
fatima...68
2-Oct-12 17:01pm
View
it is a very simple example but i dont know that how i can put numbers from text box in array
fatima...68
2-Oct-12 16:59pm
View
thanks for your comment
fatima...68
2-Oct-12 16:54pm
View
from one text box dear friend
Show More