protected void btnCopy_Click(object sender, EventArgs e) { var pid = Request.QueryString["pid"]; if (eb.CheckPollExistForTerm(Convert.ToInt32(pid), ddlTerms.SelectedItem.Value) == 0) { if (eb.CopyPoll(Convert.ToInt32(pid), ddlTerms.SelectedItem.Value)) { ScriptManager.RegisterStartupScript(this, this.GetType(), "CloseAndRebind", "CloseAndRebind(true);", true); } else { ShowError("خطا در ثبت اطلاعات! لطفاً مجدداً تلاش نمائید."); } } else { ShowError("این پرسشنامه قبلاً برای ترم انتخابی ایجاد شده است."); } }