15,895,462 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 Abuamer (Top 22 by date)
Abuamer
9-Jan-22 14:04pm
View
MR Dave Kreskowiak:
It is not appropriate to make fun of me. If you don't have an answer, don't make fun of anyone.
Abuamer
26-Nov-21 5:56am
View
No it works fine
Abuamer
26-Nov-21 5:56am
View
No it works fine
Abuamer
25-Nov-21 15:40pm
View
please more explain
Abuamer
29-Dec-19 3:31am
View
OK I will Give You An Example For What I want In More Details. Cristiano Ronaldo Is Agreat Player And His Full Name Is (Cristaino Ronaldo Dos Santos Aveiro).
Aveiro Is the grand Grand Father with level 0.
Dos Santos is the son Of Aveiro with level 1.
Ronaldo Is the son of Dos Santos with level 2.
And Finally Cristiano Is The Son of Ronaldo With Level 3.
what i want to do is when i select cristiano my output should be like that
(Cristiano / Ronaldo / Dos Santos / Aveiro)
the output should gives me Cristiano / his father /his grand Father/his grand grand Father)
and this is the query to create the table with hierarchical view
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Tbl_ChartOfAccountsTree](
[Chart_ID] [int] NOT NULL,
[Chart_Name] [nvarchar](500) NULL,
[Account_Level] [int] NULL,
[ParentAccount] [int] NULL,
[Accoutn_Type] [nvarchar](150) NULL,
[Direction] [nvarchar](150) NULL,
[OB] [decimal](18, 2) NULL,
[Date] [date] NULL,
CONSTRAINT [PK_Tbl_ChartOfAccountsTree] PRIMARY KEY CLUSTERED
(
[Chart_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[Tbl_ChartOfAccountsTree] ([Chart_ID], [Chart_Name], [Account_Level], [ParentAccount], [Accoutn_Type], [Direction], [OB], [Date]) VALUES (0, N'Aveiro', 0, NULL, N'Parent', NULL, CAST(0.00 AS Decimal(18, 2)), CAST(N'2019-07-01' AS Date))
GO
INSERT [dbo].[Tbl_ChartOfAccountsTree] ([Chart_ID], [Chart_Name], [Account_Level], [ParentAccount], [Accoutn_Type], [Direction], [OB], [Date]) VALUES (1000, N'Dos Santos', 1, 0, N'Parent', N'Balance', CAST(0.00 AS Decimal(18, 2)), CAST(N'2019-07-01' AS Date))
GO
INSERT [dbo].[Tbl_ChartOfAccountsTree] ([Chart_ID], [Chart_Name], [Account_Level], [ParentAccount], [Accoutn_Type], [Direction], [OB], [Date]) VALUES (1100, N'Ronaldo', 2, 1000, N'Parent', N'Balance', CAST(0.00 AS Decimal(18, 2)), CAST(N'2019-07-01' AS Date))
GO
INSERT [dbo].[Tbl_ChartOfAccountsTree] ([Chart_ID], [Chart_Name], [Account_Level], [ParentAccount], [Accoutn_Type], [Direction], [OB], [Date]) VALUES (1101, N'Cristiano', 3, 1100, N'Child', N'Balance', CAST(0.00 AS Decimal(18, 2)), CAST(N'2019-11-01' AS Date))
GO
ALTER TABLE [dbo].[Tbl_ChartOfAccountsTree] WITH CHECK ADD CONSTRAINT [FK_Tbl_ChartOfAccountsTree_Tbl_ChartOfAccountsTree] FOREIGN KEY([ParentAccount])
REFERENCES [dbo].[Tbl_ChartOfAccountsTree] ([Chart_ID])
GO
ALTER TABLE [dbo].[Tbl_ChartOfAccountsTree] CHECK CONSTRAINT [FK_Tbl_ChartOfAccountsTree_Tbl_ChartOfAccountsTree]
GO
so please is there is any possible help
Abuamer
28-Dec-19 4:51am
View
OK I will Give You An Example For What I want In More Details. Cristiano Ronaldo Is Agreat Player And His Full Name Is (Cristaino Ronaldo Dos Santos Aveiro).
Aveiro Is the grand Grand Father with level 0.
Dos Santos is the son Of Aveiro with level 1.
Ronaldo Is the son of Dos Santos with level 2.
And Finally Cristiano Is The Son of Ronaldo With Level 3.
what i want to do is when i select cristiano my output should be like that
(Cristiano / Ronaldo / Dos Santos / Aveiro)
the output should gives me Cristiano / his father /his grand Father/his grand grand Father)
and this is the query to create the table with hierarchical view
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Tbl_ChartOfAccountsTree](
[Chart_ID] [int] NOT NULL,
[Chart_Name] [nvarchar](500) NULL,
[Account_Level] [int] NULL,
[ParentAccount] [int] NULL,
[Accoutn_Type] [nvarchar](150) NULL,
[Direction] [nvarchar](150) NULL,
[OB] [decimal](18, 2) NULL,
[Date] [date] NULL,
CONSTRAINT [PK_Tbl_ChartOfAccountsTree] PRIMARY KEY CLUSTERED
(
[Chart_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[Tbl_ChartOfAccountsTree] ([Chart_ID], [Chart_Name], [Account_Level], [ParentAccount], [Accoutn_Type], [Direction], [OB], [Date]) VALUES (0, N'Aveiro', 0, NULL, N'Parent', NULL, CAST(0.00 AS Decimal(18, 2)), CAST(N'2019-07-01' AS Date))
GO
INSERT [dbo].[Tbl_ChartOfAccountsTree] ([Chart_ID], [Chart_Name], [Account_Level], [ParentAccount], [Accoutn_Type], [Direction], [OB], [Date]) VALUES (1000, N'Dos Santos', 1, 0, N'Parent', N'Balance', CAST(0.00 AS Decimal(18, 2)), CAST(N'2019-07-01' AS Date))
GO
INSERT [dbo].[Tbl_ChartOfAccountsTree] ([Chart_ID], [Chart_Name], [Account_Level], [ParentAccount], [Accoutn_Type], [Direction], [OB], [Date]) VALUES (1100, N'Ronaldo', 2, 1000, N'Parent', N'Balance', CAST(0.00 AS Decimal(18, 2)), CAST(N'2019-07-01' AS Date))
GO
INSERT [dbo].[Tbl_ChartOfAccountsTree] ([Chart_ID], [Chart_Name], [Account_Level], [ParentAccount], [Accoutn_Type], [Direction], [OB], [Date]) VALUES (1101, N'Cristiano', 3, 1100, N'Child', N'Balance', CAST(0.00 AS Decimal(18, 2)), CAST(N'2019-11-01' AS Date))
GO
ALTER TABLE [dbo].[Tbl_ChartOfAccountsTree] WITH CHECK ADD CONSTRAINT [FK_Tbl_ChartOfAccountsTree_Tbl_ChartOfAccountsTree] FOREIGN KEY([ParentAccount])
REFERENCES [dbo].[Tbl_ChartOfAccountsTree] ([Chart_ID])
GO
ALTER TABLE [dbo].[Tbl_ChartOfAccountsTree] CHECK CONSTRAINT [FK_Tbl_ChartOfAccountsTree_Tbl_ChartOfAccountsTree]
GO
so please is there is any possible help
Abuamer
28-Dec-19 3:29am
View
thank you my friend . but i am sorry it did not solve the problem. so please help me .
Abuamer
24-Mar-19 4:48am
View
thank you my friend.could you help me with converting images into jpg frmat before saving them. inside my method above.. thank you
Abuamer
21-Mar-19 10:31am
View
really thank you so much my friend .i am really graceful
Abuamer
20-Mar-19 5:16am
View
i have tried some little search but i am new in c# and i have a big problem with understanding the code. so please if you code help me i will be graceful.finally thank you at all
Abuamer
20-Mar-19 5:14am
View
iam sorry for my weak syntax. i am new in c#.please forgive me . but i want you to know iam not jocking
Abuamer
22-Dec-18 6:50am
View
thank you very much. it was so helpful.
Abuamer
22-Dec-18 5:33am
View
thank you for your concern> but could u give me an example
Abuamer
1-Dec-18 22:04pm
View
first of all .. thank you all of you guys. really thank you. but i have tried some way which i want to share with you.i have used a button and made this>>>
private void barbtnNew_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
int sum=0;
for(int i=0;i<Dgv_Invoice.Rows.Count-1;i++)
{
var band=Dgv_Invoice.Rows[i].Cells[0].Value.ToString();
for(int k=0;k<dgv_CostCenter.Rows.Count-1;k++)
{
var band2 = dgv_CostCenter.Rows[k].Cells[0].Value.ToString();
if(band==band2)
{
sum+=Convert.ToInt32(dgv_CostCenter.Rows[k].Cells[2].Value);
Dgv_Invoice.Rows[i].Cells[2].Value=sum;
}
}
}
}
but it works for only first row >
can you help me please
Abuamer
1-Dec-18 16:43pm
View
first of all .. thank you all of you guys. really thank you. but i have tried some way which i want to share with you.i have used a button and made this>>>
private void barbtnNew_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
int sum=0;
for(int i=0;i<Dgv_Invoice.Rows.Count-1;i++)
{
var band=Dgv_Invoice.Rows[i].Cells[0].Value.ToString();
for(int k=0;k<dgv_CostCenter.Rows.Count-1;k++)
{
var band2 = dgv_CostCenter.Rows[k].Cells[0].Value.ToString();
if(band==band2)
{
sum+=Convert.ToInt32(dgv_CostCenter.Rows[k].Cells[2].Value);
Dgv_Invoice.Rows[i].Cells[2].Value=sum;
}
}
}
}
but it works for only first row >
can you help me please
Abuamer
6-Nov-18 15:05pm
View
thank you Aydin Homay . realy Helpful for me.iam graceful for you.thank u my friend
Abuamer
6-Nov-18 7:54am
View
Yes you understand me will.so please give me alive example.i will be graceful for you.thank u for your interest
Abuamer
29-Oct-18 13:20pm
View
thank you ZurdoDev. thank you for your support.
Abuamer
28-Oct-18 22:44pm
View
thank you for you help.thanks so much
Abuamer
1-Mar-18 4:19am
View
thank you bryian.good job
Abuamer
23-Feb-18 13:59pm
View
thank you brother. there is another question . i want to get opening balance in the first row . which is the balance before the @datefrom. is that possible?
Abuamer
8-Oct-16 3:33am
View
the value i save in combobox 1 in the first formm(form). passed into the combobox in form2. but one value i need to pass all the values(all combo indexes)> do u understand me?
Show More