private void Edit_Data(long ITEM)
{
WebCrmService.Service du = new WebCrmService.Service();
string[] parameters = new string[1] {"@ID " };
string[] dbtype = new string[1] { "bigint" };
string[] type = new string[1] { "input" };
object[] value = new object[1] { long.Parse(Request.QueryString["EditItem_id"]) };
string[] length = new string[1] { "20" };
DataSet ds = new DataSet();
ds = du.returnDataSet("proc", "Edit_Fuel_Entry_Detail", parameters, dbtype, type, value, length);
if (ds.Tables[0].Rows.Count > 0)
{
Tank_Capacity.Text = ds.Tables[0].Rows[0]["TANK_CAPACITY"].ToString();
Tank_Length.Text = ds.Tables[0].Rows[0]["TANK_LENGTH"].ToString();
Tank_Diameter.Text = ds.Tables[0].Rows[0]["TANK_DIAMETER"].ToString();
Min_Reading.Text = ds.Tables[0].Rows[0]["MIN_READING"].ToString();
Max_Reading.Text = ds.Tables[0].Rows[0]["MAX_READING"].ToString();
txt_ENTRY_DATE.Text = ds.Tables[0].Rows[0]["ENTRY_DATE"].ToString();
ddl_Zone.SelectedValue = ds.Tables[0].Rows[0]["Zone_ID"].ToString();
ddl_Asset.SelectedValue = ds.Tables[0].Rows[0]["V_ID"].ToString();
**int iValue = Convert.ToInt32( ds.Tables[0].Rows[0["COMPANY_ID"].ToString());
tvDepartment.Nodes[iValue].Selected = true;**
}
}
我用它来通过网格EDIT按钮更新记录,我想选择公司所选择的索引更改公司的树节点我选择其他项目,如何从树视图中选择页面加载节点