/// <summary> /// 特殊調整 2009-07-02 cyhsu add /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void BusBtn_SpAdjust_Click(object sender, EventArgs e) { try { #region 參數檢查 if (DISNOTxt.Text == "") { throw new Exception("配本序號未產生,請先存檔"); } if (SLP_ApproveDate.Text != "") { throw new Exception("配本已確認,不可重算配量"); } if (SLP_SKU1.Text == "") { throw new Exception("配本商品未設定!"); } if (SLP_ItemPeriod1.Text == "") { throw new Exception("未設定期別!"); } #endregion #region 執行計算 ArrayList ParameterList = new ArrayList(); ParameterList.Clear(); ParameterList.Add(DISNOTxt.Text); ParameterList.Add(SLP_SKU1.Text); ParameterList.Add(SLP_ItemPeriod1.Text); ParameterList.Add(null);//通路 ParameterList.Add(Session["UID"].ToString()); ALOModel.MaintainDisRecord BCO = new ALOModel.MaintainDisRecord(ConnectionDB); BCO.CalculateDisQtyFoSPAdjust(ParameterList, null); #endregion #region 更新UI ALOItemBind(SLP_SKU1.Text, SLP_ItemPeriod1.Text ); ScriptManager.RegisterStartupScript(this, this.GetType(), "ClientScript", "alert('特殊調整完成!!');", true); #endregion } catch (Exception ex) { this.ErrorMsgLabel.Text = ex.Message; } finally { UpdatePanel_ErrorMessage.Update(); } }