Click here to Skip to main content
15,895,084 members

Comments by Mohammad Soleimani (Top 2 by date)

Mohammad Soleimani 30-Jun-14 8:21am View    
Hi George Jonsson
when i used your code like this
public DataTable Report_WarehouseStore(int index)
{

if (dtObject.Rows.Count > 0)
{
int objectID = (int)dtObject.Rows[index]["iD"];
int warehouseID = (int)dtWarehouse.Rows[index]["iD"];
SqlDataAdapter da = new SqlDataAdapter(
String.Format(@"SELECT WarehouseStore.ProductID, WarehouseStore.ProductCode, WarehouseStore.ProductName, UnitPart.UnitPart,
Warehouse.WarehouseName,WarehouseStore.ProductValue FROM WarehouseStore INNER JOIN UnitPart ON WarehouseStore.UnitPartID = UnitPart.UnitPartid
INNER JOIN Warehouse ON Warehouse.WarehouseiD = WarehouseStore.WarehouseiD WHERE WarehouseStore.ProductCode = {0} AND WarehouseStore.WarehouseiD = {1}",
objectID, warehouseID), new _Connections().Cnn);

DataTable dt = new DataTable();
da.Fill(dt);

return dt;
}

returned the error from index"Error"DAL._Report.Report_WarehouseStore(int)': not all code paths return a value"

do you want Upload project?
thanks again for try.
Mohammad Soleimani 30-Jun-14 2:55am View    
Data "dtObject" and "dtWarehouse" insert by User. i want select data from WarehoseStore when WarehoseStore.ProductCode=dtObject.iD and WarehouseStore.WarehouseiD=dtWarehouse.iD

if dtObject database table is this can work bou now i cant run query on this position.