15,912,082 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 Sam Oryza Reyno (Top 24 by date)
Sam Oryza Reyno
20-Jun-13 0:46am
View
Like
TabelType
| ID | Type | ParentSubID |
| 1 | type 1 | 0 |
| 2 | type 2 | 0 |
| 3 | stype1 | 1 |
| 4 | system1| 2 |
and delete the tabelSubType and TabelSystem?
like this??
Sam Oryza Reyno
20-Jun-13 0:39am
View
i got some of the idea,,
what if some models did not have any SubType, but have System,,
it would be like
- Type
- Subtype
- Model
or maybe
- Type
- System
- Model
what should i do?
Sam Oryza Reyno
20-Jun-13 0:26am
View
ahh,, i'm sorry .. i was confused too whether its my bad english or i'm a really newb in C#.. >.<
this one i got some,,
im trying to figure it out, is it like this?
*little bit forgot how to do reader and command,, ill correct that in my codes
string command = "select * from TabelSubType where typeid = ";
SqlCommands com = new SqlCommands(command + var);
datareaders dr = new datareader (com, cn);
then iterate until the last row?
is that it?? sorry if im totally wrong..
Sam Oryza Reyno
20-Jun-13 0:14am
View
please look at my codes that i comment..
i try to use data relation too,, is it what u mean with running SQL that get the childs node?
Sam Oryza Reyno
20-Jun-13 0:05am
View
i add some protection too.. with
if (dat1["ID"].ToString() == dat2["CatID"].ToString())
{
tn1.Nodes.Add(tn2);
}
Sam Oryza Reyno
20-Jun-13 0:02am
View
from the code i wrote,, i do the iterate with this
-my example of iterating Category Table from Parent Table-
foreach(DataRow dat1 in ds.Tables["TabelParent"].Rows)
{//1 Parent
TreeNode tn1 = new TreeNode(dat1["Parent"].ToString());
foreach (DataRow dat2 in ds.Tables["TabelCategory"].Rows)
{//2 Category
TreeNode tn2 = new TreeNode(dat2["Category"].ToString());
tn1.Nodes.Add(tn2);
}
treeView1.Nodes.Add(tn1);
}
is this good?
Sam Oryza Reyno
19-Jun-13 23:57pm
View
well, i can't told as paid work, because i'm working but didn't got paid..
i'll try what i can do,, so just guide me there..
Sam Oryza Reyno
19-Jun-13 23:47pm
View
1. by the parentID,
2. Me and my friend(Co Work) had an ambiguity with the word "store", can u explain more?
3. An example:
TabelType
ID | Name | Category ID
1 | cooking eq | 1
TabelSubType
ID | Name | TypeID
1 | Spatula | 1
it will be
...
- Cooking Eq
- Spatula
- ...
4. Am i not store the tree yet with that "messing" code?
Sam Oryza Reyno
19-Jun-13 23:34pm
View
honestly i was confused with your last word.. >.< about store the id of the direct parent..
Sam Oryza Reyno
19-Jun-13 22:36pm
View
can u help me with some code? coz im losing my mind because of this..
Sam Oryza Reyno
19-Jun-13 0:56am
View
I add my table design,, so if u have any suggestion to change it, please tell me
Sam Oryza Reyno
19-Jun-13 0:42am
View
i called it as 'tabel' because i'm Indonesian..
I made 6 table for each level,, and the Model Table with 5 Foreign key..
I was blank right now,, so if u could give me some code, i'd really helped..
Before Thanks
Sam Oryza Reyno
17-Jun-13 23:29pm
View
yea i guess,, thanks Christ..
Sam Oryza Reyno
17-Jun-13 23:14pm
View
What handler i should use?
do i give a handler to printPreviewDocument / printDialog?
Sam Oryza Reyno
14-Jun-13 4:32am
View
Thanks Bullet,
I have figure it out.. its self mistake because i accidently delete my eventhandler on the properties box..
I hope this question will help others.. :)
Sam Oryza Reyno
14-Jun-13 3:31am
View
i'm sorry,, newb here..
so can u help me maybe?
Sam Oryza Reyno
14-Jun-13 2:45am
View
Deleted
here is the code i've been trying
private void PrintDocument1_PrintPage(System.Object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
byte[] gambar = new byte[0];
gambar = (byte[])(dgv_ProductData.CurrentRow.Cells[5].Value);
MemoryStream ms = new MemoryStream(gambar);
Size sz = new Size();
Bitmap bm = new Bitmap(ms);
e.Graphics.DrawImage(bm, 0, 0);
}
private void btn_Print_Click(object sender, EventArgs e)
{
printPreviewDialog1.Document = printDocument1;
printPreviewDialog1.ShowDialog();
}
Sam Oryza Reyno
13-Jun-13 21:57pm
View
i've tried to Show the picture from data grid in other form, and then print the form in case i didn't know how to do what i wanted.. but printing the Form made the printing result bad, i mean it isn't good looking for people..
Sam Oryza Reyno
12-Jun-13 23:37pm
View
So, Could u help me Sergey?
Sam Oryza Reyno
12-Jun-13 23:24pm
View
I've try to print a form that contain the pictures i need, but it isn't good looking. So i'm searching for an alternative..
Sam Oryza Reyno
12-Jun-13 23:22pm
View
sorry that i didn't mention the Form in Visual Studio.. As i have correcting my question, i had a Form, it contains a datagridview..
Sam Oryza Reyno
4-Jun-13 22:00pm
View
6th column is declared as Varbinary(max) (i read some post about how to insert image into database , and they said i must use varbinary datatype)
when i insert an image, the cell wrote binary data
Error message:
Index was out of range. Must be non-negative and less than the size of the collection.
SQL Server 2008 R2 ..
Sam Oryza Reyno
4-Jun-13 21:27pm
View
i have update my question, in case of ambiguity.. are you still confused?
(sorry if my english make you confused)
Sam Oryza Reyno
4-Jun-13 21:16pm
View
Byte[] picture = (Byte[]) row.Cells[5].Value;
when i run it, and double click on my GridView, my program stopped on that line.
Show More