Click here to Skip to main content
15,899,475 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have four datatables
datatable1 

                       DataView view = dt1.DefaultView;
                        view.Sort = "Wfname ASC";
                        DT1NEW= view.ToTable();
datatable2
			DataView view = dt2.DefaultView;
                        view.Sort = "Bfname ASC";
                        DT2NEW = view.ToTable();

datatable3
  			DataView view = dt3.DefaultView;
                        view.Sort = "Tfname ASC";
                        DT3NEW = view.ToTable();    

datatable4 

  			DataView view = dt4.DefaultView;
                        view.Sort = "Dname ASC";
                        DT4NEW = view.ToTable();



now based on the drop down selection i need to check whether all the datatables have same no of rows or same data or not without checking the extensions
if(ddlstype.SelectedValue == "1")
{
i need to check DT1NEW,DT2NEW and DT3NEW have same no of rows and  same names or not
}
if(ddlstype.SelectedValue == "2")
{
i need to check DT1NEW and DT2NEW  have same no of rows and  same names or not
}
if(ddlstype.SelectedValue == "3")
{
i need to check DT1NEW,DT3NEW and DT4NEW have same no of rows and  same names or not
}


that means if my DT1NEW has
Wfname
501.wav
502.wav
503.wav
and DT2NEW has
Bfname
501.doc
600.doc
604.doc
610.docx
and my DT3NEW has
501.docx
700.doc

it should show an error message that please upload equal number of files

in the next case if my dts are in this way
Wfname
501.wav
502.wav

and DT2NEW has
Bfname
501.doc
600.doc
and my DT3NEW has
501.doc
700.doc

then 501 record should be inserted into database and for the second row it should show that
502 does not match with 600 and 700
how can i do this

What I have tried:

i am new to this so can anyone help me out
Posted
Updated 8-Sep-17 3:49am
v3
Comments
Graeme_Grant 8-Sep-17 8:43am    
"i am new to this so can anyone help me out" - really?

You have asked 34 questions - 20+ in the last 6 months. Surely by now you would know how to correctly format the code and data. At least make an effort if you expect us too.
Member 12324523 8-Sep-17 8:44am    
ok sorry i will do it

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900