//取消報名
    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");
        }
    }
Ejemplo n.º 2
0
    //取消報名
    protected void lbtnCancelRegist_Click(object sender, EventArgs e)
    {
        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.activity_id           = activity_id;
            OpenRegistedByMeEmpSelector1.regist_by             = "";
            OpenRegistedByMeEmpSelector1.regist_deadline       = regist_deadline;
            OpenRegistedByMeEmpSelector1.cancelregist_deadline = cancelregist_deadline;
            OpenRegistedByMeEmpSelector1.InitDataAndShow();
        }
        else
        {
            // Response.Redirect("~/WebForm/RegistActivity/RegistActivity_Team.aspx?ActID=" + activity_id);
            //Session["ActID"] = activity_id;
            // Response.Redirect("~/WebForm/RegistActivity/RegistedActivityQuery.aspx");
            OpenRegistedTeammemberSelector1.Visible     = true;
            OpenRegistedTeammemberSelector1.activity_id = activity_id;
            //OpenRegistedTeammemberSelector1.emp_id = clsAuth.ID;
            OpenRegistedTeammemberSelector1.regist_deadline       = regist_deadline;
            OpenRegistedTeammemberSelector1.cancelregist_deadline = cancelregist_deadline;
            OpenRegistedTeammemberSelector1.InitDataAndShow();
        }
    }