//取消報名 protected void lbtnRegistCancel_Click(object sender, EventArgs e) { try { string activity_id = GridView1.DataKeys[((sender as LinkButton).NamingContainer as GridViewRow).RowIndex].Values[0].ToString(); string activity_type = GridView1.DataKeys[((sender as LinkButton).NamingContainer as GridViewRow).RowIndex].Values[1].ToString(); string regist_deadline = (sender as LinkButton).CommandArgument; string cancelregist_deadline = (sender as LinkButton).CommandName; if (activity_type == "1") { OpenRegistedByMeEmpSelector1.Visible = true; OpenRegistedByMeEmpSelector1.activity_id = activity_id; OpenRegistedByMeEmpSelector1.regist_by = clsAuth.ID; OpenRegistedByMeEmpSelector1.regist_deadline = regist_deadline; OpenRegistedByMeEmpSelector1.cancelregist_deadline = cancelregist_deadline; OpenRegistedByMeEmpSelector1.InitDataAndShow(); } else { OpenRegisedTeammemberSelector1.Visible = true; OpenRegisedTeammemberSelector1.activity_id = activity_id; OpenRegisedTeammemberSelector1.emp_id = clsAuth.ID; OpenRegisedTeammemberSelector1.regist_deadline = regist_deadline; OpenRegisedTeammemberSelector1.cancelregist_deadline = cancelregist_deadline; OpenRegisedTeammemberSelector1.InitDataAndShow(); } } catch (Exception ex) { WriteErrorLog("CancelRegister", ex.Message, "0"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { //======2011/3/30 分為個人及團隊 if (Request.QueryString["Type"] != null) { Session["Type"] = Request.QueryString["Type"]; } if (Session["Type"] == null) { Session["Type"] = "1"; } else { if (Session["Type"].ToString() == "2") { // GridView1.Columns[5].HeaderText = "已報名隊數"; GridView1.Columns[4].HeaderText = "可報名隊數"; GridView1.Columns[5].HeaderText = "已報名隊數"; } } if (Session["EmpID"] != null) { btnQuery.Visible = false; OpenRegisedTeammemberSelector1.Visible = true; OpenRegisedTeammemberSelector1.activity_id = Session["ActID"].ToString(); OpenRegisedTeammemberSelector1.emp_id = Session["EmpID"].ToString(); ACMS.VO.ActivatyVO vo1 = new ACMS.VO.ActivatyVO(); ACMS.BO.ActivatyBO bo1 = new ACMS.BO.ActivatyBO(); Guid id1 = new Guid(Session["ActID"].ToString()); vo1 = bo1.SelectActivatyByActivatyID(id1); OpenRegisedTeammemberSelector1.regist_deadline = vo1.regist_deadline.ToString(); OpenRegisedTeammemberSelector1.cancelregist_deadline = vo1.cancelregist_deadline.ToString(); OpenRegisedTeammemberSelector1.InitDataAndShow(); Session.Remove("ActID"); Session.Remove("EmpID"); return; } //andy if (!(string.IsNullOrEmpty(Request.QueryString["ActID"]))) { ACMS.VO.ActivatyVO vo = new ACMS.VO.ActivatyVO(); ACMS.BO.ActivatyBO bo = new ACMS.BO.ActivatyBO(); Guid id = new Guid(Request.QueryString["ActID"]); vo = bo.SelectActivatyByActivatyID(id); txtactivity_name.Text = vo.activity_name; } if (Session["ActID"] != null) { if (!(string.IsNullOrEmpty(Session["ActID"].ToString()))) { ACMS.VO.ActivatyVO vo1 = new ACMS.VO.ActivatyVO(); ACMS.BO.ActivatyBO bo1 = new ACMS.BO.ActivatyBO(); Guid id1 = new Guid(Session["ActID"].ToString()); vo1 = bo1.SelectActivatyByActivatyID(id1); txtactivity_name.Text = vo1.activity_name; } Session.Remove("ActID"); } //=========================================== (this.Master as MyMasterPage).PanelMainGroupingText = "已報名活動查詢"; ObjectDataSource1.SelectParameters["emp_id"].DefaultValue = clsAuth.ID; btnQuery_Click(null, null); } } catch (Exception ex) { WriteErrorLog("PageLoad", ex.Message, "0"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["EmpID"] != null) { rblActivity_type.SelectedValue = "2"; //btnQuery.Visible = false; OpenRegisedTeammemberSelector1.activity_id = Session["ActID"].ToString(); OpenRegisedTeammemberSelector1.emp_id = Session["EmpID"].ToString(); ACMS.VO.ActivatyVO vo1 = new ACMS.VO.ActivatyVO(); ACMS.BO.ActivatyBO bo1 = new ACMS.BO.ActivatyBO(); Guid id1 = new Guid(Session["ActID"].ToString()); vo1 = bo1.SelectActivatyByActivatyID(id1); OpenRegisedTeammemberSelector1.Visible = true; OpenRegisedTeammemberSelector1.regist_deadline = vo1.regist_deadline.ToString(); OpenRegisedTeammemberSelector1.cancelregist_deadline = vo1.cancelregist_deadline.ToString(); OpenRegisedTeammemberSelector1.InitDataAndShow(); OpenRegisedTeammemberSelector1.IsManager = "1"; Session.Remove("ActID"); Session.Remove("EmpID"); for (int i = 2010; i <= DateTime.Now.Year + 1; i++) { ddlYear.Items.Add(i.ToString()); } ddlYear.SelectedValue = Session["YearNo"].ToString(); ddlMonth.SelectedValue = Session["MonthNo"].ToString(); ddlUnit.SelectedValue = Session["Unit"].ToString(); if (Request["type"] != null && Request["type"] == "off") { (this.Master as MyMasterPage).PanelMainGroupingText = "歷史資料查詢"; GridView1.Columns[7].Visible = false; ObjectDataSource1.SelectParameters["querytype"].DefaultValue = "off"; } else { (this.Master as MyMasterPage).PanelMainGroupingText = "報名狀態查詢"; ObjectDataSource1.SelectParameters["querytype"].DefaultValue = ""; } btnQuery_Click(null, null); return; } if (!IsPostBack) { Session.Remove("History"); for (int i = 2010; i <= DateTime.Now.Year + 1; i++) { ddlYear.Items.Add(i.ToString()); } ddlYear.SelectedValue = DateTime.Now.Year.ToString(); ddlMonth.SelectedValue = DateTime.Now.Month.ToString(); if (Request["type"] != null && Request["type"] == "off") { (this.Master as MyMasterPage).PanelMainGroupingText = "歷史資料查詢"; GridView1.Columns[7].Visible = false; ObjectDataSource1.SelectParameters["querytype"].DefaultValue = "off"; } else { (this.Master as MyMasterPage).PanelMainGroupingText = "報名狀態查詢"; ObjectDataSource1.SelectParameters["querytype"].DefaultValue = ""; } btnQuery_Click(null, null); } } catch (Exception ex) { WriteErrorLog("PageLoad", ex.Message, "0"); } }