protected void gvSIGNUP_RowCommand(object sender, GridViewCommandEventArgs e) { //點擊按鈕將顯示隱藏的使用者控制項 if (e.CommandName == "post") { //Console.Write("OK"); //Button1.Text = e.CommandArgument.ToString(); //Button2.Text = "QQ"; ModalPanel.Visible = true; Signup.gettitle(e.CommandArgument.ToString().Split(new string[] { ",," }, StringSplitOptions.RemoveEmptyEntries)[0].Trim()); Signup.getcontent(e.CommandArgument.ToString().Split(new string[] { ",," }, StringSplitOptions.RemoveEmptyEntries)[1].Trim()); //Signup.Startdate(e.CommandArgument.ToString().Split(new string[] { ",," }, StringSplitOptions.RemoveEmptyEntries)[2].Trim()); Signup.Enddate(e.CommandArgument.ToString().Split(new string[] { ",," }, StringSplitOptions.RemoveEmptyEntries)[2].Trim(), e.CommandArgument.ToString().Split(new string[] { ",," }, StringSplitOptions.RemoveEmptyEntries)[3].Trim()); Signup.Enddate(e.CommandArgument.ToString().Split(new string[] { ",," }, StringSplitOptions.RemoveEmptyEntries)[2].Trim(), e.CommandArgument.ToString().Split(new string[] { ",," }, StringSplitOptions.RemoveEmptyEntries)[3].Trim()); Signup.Addons1(e.CommandArgument.ToString().Split(new string[] { ",," }, StringSplitOptions.RemoveEmptyEntries)[4].Trim()); Signup.Addons2(e.CommandArgument.ToString().Split(new string[] { ",," }, StringSplitOptions.RemoveEmptyEntries)[5].Trim()); Signup.getuser(e.CommandArgument.ToString().Split(new string[] { ",," }, StringSplitOptions.RemoveEmptyEntries)[6].Trim()); Signup.eventID(e.CommandArgument.ToString().Split(new string[] { ",," }, StringSplitOptions.RemoveEmptyEntries)[7].Trim()); Signup.getactivedate(e.CommandArgument.ToString().Split(new string[] { ",," }, StringSplitOptions.RemoveEmptyEntries)[8].Trim(), e.CommandArgument.ToString().Split(new string[] { ",," }, StringSplitOptions.RemoveEmptyEntries)[9].Trim()); Signup.FileURL(e.CommandArgument.ToString().Split(new string[] { ",," }, StringSplitOptions.RemoveEmptyEntries)[10].Trim()); } if (e.CommandName == "excel") { string strJS = "location.href = ('../files/signup/活動報名統計表格.xlsx');"; Page.ClientScript.RegisterStartupScript(this.GetType(), "", strJS, true); } if (e.CommandName == "remove") { DAL.JuicDao dao = new DAL.JuicDao("MENU"); var GetSingupTotalid = dao.GetSingupTotalid(e.CommandArgument.ToString(), User.Identity.Name.ToString()); string Totalid = ""; if (GetSingupTotalid.Rows.Count != 0) { Totalid = GetSingupTotalid.Rows[0]["ID"].ToString(); } dao.RemoveSignup(e.CommandArgument.ToString(), User.Identity.Name.ToString(), Totalid);//待新增 gvSIGNUP.DataBind(); } }