private DataTable DataLoad(string V_VANDOR, string V_TAX_TYPE) { #region 傳入參數 ParameterList.Clear(); ParameterList.Add(GetValueSetParameter(V_VANDOR, "string", false)); ParameterList.Add(GetValueSetParameter(V_TAX_TYPE, "string", false)); #endregion #region 取得資料 DataTable dt_Return = new DataTable(); BCO.VAM17_BCO bco = new BCO.VAM17_BCO(ConnectionDB); dt_Return = bco.QueryDiscountSource(ParameterList); return dt_Return; #endregion }
protected void ButtonNew_Click(object sender, EventArgs e) { #region try { #region 檢查條件 this.ErrorMsgLabel.Text = ""; this.GridView1.Visible = false; if (this.SLP_EnumBase1.Text == "") { this.ErrorMsgLabel.Text = "請選擇單一稅別"; SetDDLFocus(((DropDownList)this.SLP_EnumBase1.FindControl("D1")).ClientID); return; } string s_CheckPage = CheckPageNew(sender); if (s_CheckPage != string.Empty) { this.ErrorMsgLabel.Text = s_CheckPage; return; } //檢查檔期資料是否存在 ParameterList.Clear(); ParameterList.Add(GetValueSetParameter(this.SLP_VendorBase1.Text.Trim(), "string", false)); ParameterList.Add(GetValueSetParameter(this.SLP_EnumBase1.Text.ToString(), "string", false)); BCO.VAM17_BCO bco = new BCO.VAM17_BCO(ConnectionDB); DataTable dt_Return = bco.QueryDiscountSource(ParameterList); if (dt_Return.Rows.Count == 0) { this.ErrorMsgLabel.Text = "查無檔期資料"; return; } #endregion Response.Redirect("VAM172.aspx?Code=VAM17&V_VANDOR=" + this.SLP_VendorBase1.Text.Trim() + "&V_VANDOR_NAME=" + this.SLP_VendorBase1.Name + "&V_TAX_TYPE=" + this.SLP_EnumBase1.Text.ToString()); } catch (Exception ex) { ErrorMsgLabel.Text = ex.Message; } finally { } #endregion }//ButtonNew_Click