|
Hi there,
Do you see the business classes listed in the combox if you uncheck the checkbox "Show only data components" in the Configuration DataSource dialog box?
|
|
|
|
|
hi
If i check "show only data components" i get a list of the table adapters available from my DAL dll. If i uncheck it, i get a list of all the classes related to my defined DataSet (Table, Row, etc). But there is no sign of the BLL classes, even tho it exists as a reference in the "BIN" folder. It puzzles me.
I even tried to copy one of the classes from my BLL dll directly into the APP_CODE folder, but the ObjectDataSource still won't recognize it, no matter if i check or uncheck "show only.."
Thanks for your input!
- Martin
-- modified at 5:23 Thursday 6th July, 2006
|
|
|
|
|
May I see the signature of one of the BLL classes?
|
|
|
|
|
 Hi again, Here's one of the BLL test classes i'm using.
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using DALTest.EmployeesDataSetTableAdapters;<br />
using DALTest;<br />
<br />
namespace BLL<br />
{<br />
[System.ComponentModel.DataObject]<br />
class EmployeesBLL<br />
{<br />
private EmployeesTableAdapter _employeesAdapter = null;<br />
<br />
protected EmployeesTableAdapter Adapter<br />
{<br />
get<br />
{<br />
if (_employeesAdapter == null)<br />
_employeesAdapter = new EmployeesTableAdapter();<br />
<br />
return _employeesAdapter;<br />
}<br />
}<br />
<br />
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select,true)]<br />
public DALTest.EmployeesDataSet.EmployeesDataTable GetEmployee(int employeeId)<br />
{<br />
return Adapter.GetData(employeeId);<br />
}<br />
<br />
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select,false)]<br />
public DALTest.EmployeesDataSet.EmployeesDataTable GetEmployeesByCountry(string country)<br />
{<br />
return Adapter.GetDataByCountry(country);<br />
}<br />
<br />
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]<br />
public bool AddEmployee(string employeeName)<br />
{<br />
DALTest.EmployeesDataSet.EmployeesDataTable employees = new DALTest.EmployeesDataSet.EmployeesDataTable();<br />
DALTest.EmployeesDataSet.EmployeesRow employee = employees.NewEmployeesRow();<br />
employee.FirstName = employeeName;<br />
employee.LastName = employeeName;<br />
employees.AddEmployeesRow(employee);<br />
int rowsAffected = Adapter.Update(employee);<br />
return rowsAffected == 1;<br />
}<br />
<br />
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]<br />
public bool DeleteEmployee(int employeeId)<br />
{<br />
int rowsAffected = Adapter.Delete(employeeId, new DateTime());<br />
return rowsAffected == 1;<br />
}<br />
<br />
}<br />
}
|
|
|
|
|
zrrbite wrote: class EmployeesBLL
Here's the culprit, the class needs to be declared as public .
|
|
|
|
|
Wow, what a horrible mistake. I feel stupid
Thanks alot.
|
|
|
|
|
zrrbite wrote: I feel stupid :
Not at all , it's because of VS as it by default generates the class template with the default access modifier, and I guess you simply use it.
|
|
|
|
|
I want to build a treeview in javascripting. Can anyone please
give me some links or coding for this.
thanks in advance.
|
|
|
|
|
See if this helps
http://www.codeproject.com/jscript/tree_view.asp
|
|
|
|
|
How can i write Client Scripting like JAVASCRIPT in ASP.NET 2.0 Using C#.
|
|
|
|
|
If u ask me there is no need to write in javascript. u just use the code behind.
if u still want to use javascript i think there is some way in the code behind file itself.
u can also include javascript just like u did for normal asp pages. using the <%%> and script tags.
i am not sure abt this. coz i have never used it.
|
|
|
|
|
lavanya_satheesh wrote: If u ask me there is no need to write in javascript. u just use the code behind.
Who's a clever boy then - that's quite a trick....how are you doing AJAX?
lavanya_satheesh wrote: if u still want to use javascript i think there is some way in the code behind file itself.
Kinda - Page.RegisterStartupScript allows you to code the js as text in the codebehind, then squirts it at the page
lavanya_satheesh wrote: u can also include javascript just like u did for normal asp pages. using the <%%> and script tags.
Except that <%%> will cause it to runat server.
To add some client side js, just add :
<br />
<script language="javascript" type="text/javascript"><br />
code goes here<br />
</script><br />
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
how to make chat using asp.net
|
|
|
|
|
you can make a Vypress or MSN like chat easily using Windows based form in ASP.Net. There are some good sites that have some source code for download. Search the google.
|
|
|
|
|
Try any of these 3 code. Probably this may help u resolve ur problem
stringVariable = dataGridView.Rows[index].Cells[index].Value.toString();
stringVariable = dataGridView.Rows[index].Cells["ColumnName"].Value.toString();
stringVariable = dataGridView.CurrentRow.Cells[index].Value.toString();
Vipin
|
|
|
|
|
How can I achieved that?
thanks in advance. Much appreciated.
|
|
|
|
|
in the data grid properties make the column as the template column and then add check box inside...
|
|
|
|
|
How should I add the check box with the datagrid.
thanks in advance. Much appreciated.
|
|
|
|
|
here you will get lot of examples on datagrid.
http://www.datagridgirl.com/articles.aspx
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks. I recall knowing that website through this forum. You reminded me. I hope I will find something useful.
thanks in advance. Much appreciated.
|
|
|
|
|
use the code i had mentioned earlier. store that value to a string and the u can use that anywhere u want to.
stringVariable = dataGridView.Rows[index].Cells[index].Value.toString();
Here U give the index of the cell thats is if u want the first cell give as 1 or if u want the second then give it as 2 etc etc.
stringVariable = dataGridView.Rows[index].Cells["ColumnName"].Value.toString();
Here U give the name of the column of the grid
Vipin
|
|
|
|
|
My problem earlier was, "how do I select certain column and its data, then pass or transfer it to another page".
Is this method correct? To tell you the truth, its my six week in learning C#.
dataGridView refers to the dgDisplay is it?
thanks in advance. Much appreciated.
|
|
|
|
|
for selecting the entire row create a new tempelate column and add a select button in the created tempelate column.Give a command name "Select" for that button in its properties.end the templelate editing. select the event properties of the grid. go to command name event. give this event as datagrid_commandname. it will take u to the code behind.
give the code as
if(e.CommandName="Select");
{
//write the code i had suggested before;
}
this will help u.
Vipin
|
|
|
|
|
Hi,
im developing a web application using vb.net,where in im creating an excel sheet ,fillin the cells and saving it,
im using windows 2000,and i have installed office 2003.
in my application i have added reference to Excel and microsoft.office.core
in the code ,im using
Imports Excel = Microsoft.Office.Interop.Excel
and in page load ,i have wriiten
Dim excelobj As New Excel.Application
Dim xlBook As Excel.Workbook
Dim xlsheet As Excel.Worksheet
Dim i As Int32
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
xlApp = CreateObject("Excel.Application")
xlBook = CType(xlApp.Workbooks.Add, Excel.Workbook)
xlSheet = CType(xlBook.Worksheets(1), Excel.Worksheet)
xlSheet.Cells(2, 2) = "This is column B row 2"
xlSheet.Application.Visible = True
xlSheet.SaveAs("C:\Test.xls")
xlApp.Quit()
xlApp = Nothing
im not getting any error when i compile ,but during execution,i get
"QueryInterface for interface Microsoft.Office.Interop.Excel._Application failed."
Exception Details: System.InvalidCastException: QueryInterface for interface Microsoft.Office.Interop.Excel._Application
failed.
Execption occurs here
xlBook = CType(xlApp.Workbooks.Add, Excel.Workbook)
pls help to solve this error
thanks
kavitha
-- modified at 2:57 Thursday 6th July, 2006
|
|
|
|
|
Actually, I'd suggest that it's failing when you try to instantiate the Application object. QueryInterface is a COM call that returns the interfaces avail for a COM Obj. Looks like somewhere it's trying to cast it to an invalid type (needs to be IUnknown)
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|