protected void btnAddRoles_Click(object sender, EventArgs e)
        {
            wbs = new ActivityManagementService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationActivity();
            objActivityOutputBo = new ActivityOutputMapBO();
            if (hidActivityDetailId.Value.ToInt32() > 0)
            {
                objActivityOutputBo.Mode = "U";
                objActivityOutputBo.ActivityOutputMapId = hidActivityDetailId.Value.ToInt32();
            }
            else
            {
                objActivityOutputBo.Mode = "I";
            }

            objActivityOutputBo.ActivityOutputId = hidOutputId.Value.ToInt32();
            objActivityOutputBo.FiscalYearId     = 1;
            objActivityOutputBo.Isenabled        = IsActive.Checked == true ? 1 : 0;
            objActivityOutputBo.ActivityDetailId = hidSelectedActivityId.Value.ToInt32();
            wbs.ActivityOutputMap(objActivityOutputBo);
            Response.Redirect(Constants.ConstantAppPath + "/Modules/ActivityManagement/ActivityOutputMap.aspx");
        }
        protected void BtnEdit_Command(object sender, CommandEventArgs e)
        {
            int roleId = 0;

            if (e.CommandName == "edit")
            {
                roleId = int.Parse(e.CommandArgument.ToString());
                SecureQueryString str = new SecureQueryString();
                str["id"] = e.CommandArgument.ToString();
                Response.Redirect(Constants.ConstantAppPath + "/Modules/ActivityManagement/ActivityOutputMap.aspx" + str.EncryptedString, false);
            }
            else if (e.CommandName == "delete")
            {
                int i = 0;
                wbs    = new ActivityManagementService();
                roleId = int.Parse(e.CommandArgument.ToString());
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationActivity();
                objActivityOutputBo = new ActivityOutputMapBO();
                objActivityOutputBo.ActivityOutputMapId = roleId;
                objActivityOutputBo.Mode = "D";
                i = wbs.ActivityOutputMap(objActivityOutputBo);
                //wbs.deleteDonar(donarId);
                if (i > 0)
                {
                    Response.Redirect(Constants.ConstantAppPath + "/Modules/ActivityManagement/ActivityOutputMap.aspx");
                }
                else
                {
                    Response.Redirect("<script>alert('Delete failed')</script>");
                }
            }
            else if (e.CommandName == "lock")
            {
                wbs = new ActivityManagementService();
                int i = 0;
                roleId = int.Parse(e.CommandArgument.ToString());
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationActivity();
                objActivityOutputBo = new ActivityOutputMapBO();
                objActivityOutputBo.ActivityOutputMapId = roleId;
                objActivityOutputBo.Mode = "L";
                i = wbs.ActivityOutputMap(objActivityOutputBo);

                if (i > 0)
                {
                    Response.Redirect(Constants.ConstantAppPath + "/Modules/ActivityManagement/ActivityOutputMap.aspx");
                }
                else
                {
                    Response.Redirect("<script>alert('Lock failed')</script>");
                }
            }
            else
            {
                wbs = new ActivityManagementService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationActivity();
                int i = 0;
                roleId = int.Parse(e.CommandArgument.ToString());
                roleId = int.Parse(e.CommandArgument.ToString());
                objActivityOutputBo = new ActivityOutputMapBO();
                objActivityOutputBo.ActivityOutputMapId = roleId;
                objActivityOutputBo.Mode = "L";
                i = wbs.ActivityOutputMap(objActivityOutputBo);
                if (i > 0)
                {
                    Response.Redirect(Constants.ConstantAppPath + "/Modules/ActivityManagement/ActivityOutputMap.aspx");
                }
                else
                {
                    Response.Redirect("<script>alert('Delete failed')</script>");
                }
            }
        }