can Any one help me in .net code
i have grideview have an datai need to read the data in first column for all rows and make an select statement to retrieve data from another table and put the result in same of grideview
i want to read the item number from here and do this statement
SELECT Item_Ledger_Entry.[Item No_]
,Sum(Cast(Item_Ledger_Entry.[Quantity]as decimal(6,3))) As 'Inventory'
FROM [HO].[dbo].[American Department Stores$Item Ledger Entry] Item_Ledger_Entry
Where Item_Ledger_Entry.[Item No_]='T474151'
And Item_Ledger_Entry.[Location Code]='S0002'
Group By Item_Ledger_Entry.[Item No_]
SELECT Item_Ledger_Entry.[Item No_]
,Sum(Cast(Item_Ledger_Entry.[
FROM [HO].[dbo].[American Department Stores$Item Ledger Entry] Item_Ledger_Entry
Where Item_Ledger_Entry.[Item No_]='T474151'
And Item_Ledger_Entry.[Location Code]='S0002'
Group By Item_Ledger_Entry.[Item No_]
Replace 'T474151' from Item Number and S0002 From Text Box

AbedElHamid AlWahidyPosted Jan 5, 2017, 2:51 AM
Mangesh GPosted Dec 20, 2016, 8:44 AM
int _RowCount = GrdSearch.Rows.Count;
//GrdSearch.Columns.Add("Inventory", "Inventory");
for (int _Row = 0; _Row <= _RowCount; _Row++)
{
var _Data = GrdSearch.Rows[_Row].Cells[0].Value;
string _Inventory_Value = "SELECT Item_Ledger_Entry.[Item No_] ,Sum(Cast(Item_Ledger_Entry.[Quantity]as decimal(20,6))) As 'Inventory' FROM[HO].[dbo].[American Department Stores$Item Ledger Entry] Item_Ledger_Entry Where Item_Ledger_Entry.[Item No_]=@InvValue And Item_Ledger_Entry.[Location Code]like '%" + ComStore.SelectedItem.ToString() + "%' Group By Item_Ledger_Entry.[Item No_] ";
SqlCommand _InventoryValue = new SqlCommand(_Inventory_Value, _Conn);
_InventoryValue.Parameters.AddWithValue("@InvValue", _Data);
SqlDataReader _Objreader_Inf = _InventoryValue.ExecuteReader();
_Objreader_Inf.Read();
dataTable.Load(_Objreader_Inf);
_Objreader_Inf.Close();
}
GrdSearch.DataSource=dataTable
AbedElHamid AlWahidyPosted Dec 20, 2016, 7:42 AM
Mangesh GPosted Dec 20, 2016, 6:37 AM
AbedElHamid AlWahidyPosted Dec 20, 2016, 6:33 AM
Mangesh GPosted Dec 20, 2016, 5:50 AM
AbedElHamid AlWahidyPosted Dec 20, 2016, 5:41 AM
AbedElHamid AlWahidyPosted Dec 20, 2016, 3:47 AM
Mangesh GPosted Dec 20, 2016, 3:13 AM
AbedElHamid AlWahidyPosted Dec 20, 2016, 2:32 AM
Midhun TpPosted Dec 20, 2016, 2:26 AM