protected void gv_Area_RowUpdating(object sender, GridViewUpdateEventArgs e) { #region TextBox txt_DIS_QTY2 = (TextBox)gv_Area.Rows[e.RowIndex].FindControl("txt_DIS_QTY2"); try { ALOModel.MaintainDisRecord BCO = new ALOModel.MaintainDisRecord(ConnectionDB); int iDisQty2; int.TryParse(txt_DIS_QTY2.Text.Trim(), out iDisQty2); string s_CHAN_NO = (this.SLP_StoreChain1.Text.Trim() == "") ? null : this.SLP_StoreChain1.Text; ArrayList ParameterList = new ArrayList();//20091113 ParameterList.Clear(); ParameterList.Add(s_DIS_NO); ParameterList.Add(s_ITEM); ParameterList.Add(s_PERIOD); ParameterList.Add(s_CHAN_NO);//通路 ParameterList.Add(gv_Area.Rows[e.RowIndex].Cells[0].Text.Trim());//區域 ParameterList.Add(iDisQty2);//實配數 ParameterList.Add(Session["UID"].ToString());//使用者 ParameterList.Add(s_SESSION_ID); bool bResult = BCO.UpdateDisAreaTmp(ParameterList, null); if (!bResult) { throw new Exception("更新失敗!"); } else { RightMsgLabel.Text = "更新暫存檔成功"; up_Msg.Update(); } } catch (Exception ex) { ErrorMsgLabel.Text = ex.Message; up_Msg.Update(); } finally { gv_Area.EditIndex = -1; QueryAllAreaData(); } #endregion }