in command one or more check box are checked
i check going to insert the record
i fill the record first time. that record only stay for last time it's self .
how i solve this
which record selected that record going to saved but one condition
that already check in and save .
select a.Contract_Description from Asset_Service_Contracts a, Asset_Service_Contracts b " +
" where a.Contract_AssetID is null and a.Contract_Description = '" + name + "' and " +
" a.Contract_Description=b.Contract_Description
else if (e.CommandName == "RowClick")
{
DataTable dt1 = new DataTable();
DataTable dt2 = new DataTable();
GridDataItem item = (GridDataItem)e.Item;
ContractID = item["ContractID"].Text;
foreach (GridDataItem item1 in RadGrid_ServiceContracts.SelectedItems) // Loop through each selected items
{
Response.Write(item1["ContractID"].Text.ToString()); // Where ID is the ColumnUniqueName
Response.Write(item1["Contract_Description"].Text.ToString()); // Where ID is the ColumnUniqueName
string ID = item1["ContractID"].Text;
string name = item1["Contract_Description"].Text;
try
{
string selectQuery = " select a.Contract_Description from Asset_Service_Contracts a, Asset_Service_Contracts b " +
" where a.Contract_AssetID is null and a.Contract_Description = '" + name + "' and " +
" a.Contract_Description=b.Contract_Description ";
sqladp.SelectCommand = new SqlCommand(selectQuery, sqlconn);
sqladp.Fill(dt1);
int i = dt1.Rows.Count;
dt1 = null;
if (i == 0)
{
}
}
catch (Exception ex)
{
RadGrid_ServiceContracts.Controls.Add(new LiteralControl("Unable to delete Id. Reason: " + ex.Message));
e.Canceled = true;
}
}
}
thanks,
mohamed
i check going to insert the record
i fill the record first time. that record only stay for last time it's self .
how i solve this
which record selected that record going to saved but one condition
that already check in and save .
select a.Contract_Description from Asset_Service_Contracts a, Asset_Service_Contracts b " +
" where a.Contract_AssetID is null and a.Contract_Description = '" + name + "' and " +
" a.Contract_Description=b.Contract_Description
else if (e.CommandName == "RowClick")
{
DataTable dt1 = new DataTable();
DataTable dt2 = new DataTable();
GridDataItem item = (GridDataItem)e.Item;
ContractID = item["ContractID"].Text;
foreach (GridDataItem item1 in RadGrid_ServiceContracts.SelectedItems) // Loop through each selected items
{
Response.Write(item1["ContractID"].Text.ToString()); // Where ID is the ColumnUniqueName
Response.Write(item1["Contract_Description"].Text.ToString()); // Where ID is the ColumnUniqueName
string ID = item1["ContractID"].Text;
string name = item1["Contract_Description"].Text;
try
{
string selectQuery = " select a.Contract_Description from Asset_Service_Contracts a, Asset_Service_Contracts b " +
" where a.Contract_AssetID is null and a.Contract_Description = '" + name + "' and " +
" a.Contract_Description=b.Contract_Description ";
sqladp.SelectCommand = new SqlCommand(selectQuery, sqlconn);
sqladp.Fill(dt1);
int i = dt1.Rows.Count;
dt1 = null;
if (i == 0)
{
}
}
catch (Exception ex)
{
RadGrid_ServiceContracts.Controls.Add(new LiteralControl("Unable to delete Id. Reason: " + ex.Message));
e.Canceled = true;
}
}
}
thanks,
mohamed