代码改变世界
2008-09-04 11:58
Vincent.C
阅读(191)
评论()
编辑
收藏
举报
- protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
- {
- switch (e.CommandName)
- {
- case "RollBack":
- string index = this.GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Value.ToString();
- string runcard_id1 = "";
- string runcard_id2 = "";
- string sqlStr = "select runcard_id1,runcard_id2 from bak_unit where unit_index='" + index + "' ";
- DataSet ds = dbc.GetDataSet(sqlStr);
- if (ds.Tables[0].Rows.Count > 0)
- {
- runcard_id1 = ds.Tables[0].Rows[0][0].ToString();
- runcard_id2 = ds.Tables[0].Rows[0][1].ToString();
- Lot_Unite_Class luc = new Lot_Unite_Class();
- luc.Unit_Index = index;
- luc.Runcard_ID1 = runcard_id1;
- luc.Runcard_ID2 = runcard_id2;
- string result = luc.Lot_Unit_Rollback();
- Alert(result);
- }
- break;
- default:
- break;
- }
- }
-
- protected void gvCurrentInfo_RowCommand(object sender, GridViewCommandEventArgs e)
- {
- int selectIndex = Convert.ToInt32(e.CommandArgument);
- GridView gridView = (GridView)sender;
- RuncardID = gridView.Rows[selectIndex].Cells[1].Text.ToString();
- StationID = gridView.Rows[selectIndex].Cells[3].Text.ToString();
- switch (e.CommandName)
- {
- case "JUMPSTATION":
- divEditAreaVisable(true);
- break;
- default:
- break;
- }
- }