protected void Button12_Click(object sender, EventArgs e) { Pass_kinisi.Update(); ModalPopupExtender2.Hide(); DropDownList2_SelectedIndexChanged(null, null); Session["Update_ABE_WAIT_pass_Schedule"] = "1"; }
protected void Button1_Click(object sender, EventArgs e) { if (DropDownList1.SelectedValue == "0") { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Δεν έχει επιλεγεί Διαβατήριο !!!!');", true); } else { Pass_kinisi.Update(); Response.Redirect("Pass_Paradosi.aspx"); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Το Διαβατήριο παραδόθηκε!');", true); } }
protected void Button1_Click(object sender, EventArgs e) { if (DropDownList3.SelectedValue == "1") { Pass3years.Update(); Pass_Update_M_Back.Update(); Response.Redirect("Pass_Pol_Reply_K.aspx"); } else { if (DropDownList1.SelectedValue == "0" || DropDownList2.SelectedValue == "10") { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Δεν έχει επιλεγεί Διαβατήριο ή Κατάσταση !!!!');", true); } else { if (Convert.ToDateTime(TextBox17.Text) > Convert.ToDateTime(TextBox8.Text)) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Λανθασμένη ημερομηνία απάντησης, προγενέστερη της αίτησης!!!!');", true); } else { if (DropDownList2.SelectedValue == "1") { Kin_Logariasmon.Insert(); } if (DropDownList2.SelectedValue == "2") { Pass3years.Insert(); } DropDownList2.Enabled = true; DropDownList1.Enabled = true; DropDownList3.Enabled = true; Pass_kinisi.Update(); Response.Redirect("Pass_Pol_Reply_K.aspx"); } } } }
protected void Button3_Click(object sender, EventArgs e) { if (TextBox20.Text == "0") { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert(' Δεν έχει επιλεγεί Αίτηση για αποστολή ');", true); } else { for (int i = 0; i < GridView3.Rows.Count; i++) { var chk = (System.Web.UI.WebControls.CheckBox)(GridView3.Rows[i].Cells[1].FindControl("O_C_CHECK")); if (chk.Checked) { TextBox117.Text = GridView3.Rows[i].Cells[8].Text; Pass_kinisi.Update(); } } Pass_kinisi.DataBind(); GridView3.DataBind(); TextBox129.Text = DateTime.ParseExact(TextBox8.Text, "dd/MM/yyyy", CultureInfo.CurrentCulture).ToString("MM/dd/yyyy"); ReportViewer1.LocalReport.DataSources.Clear(); ReportDataSource rds1 = new ReportDataSource(); rds1.Name = "DataSet1"; rds1.Value = Pass_kinisi_Rep; ReportViewer1.LocalReport.DataSources.Add(rds1); ReportViewer1.LocalReport.Refresh(); Warning[] warnings; string[] streamIds; string mimeType = string.Empty; string encoding = string.Empty; string extension = string.Empty; // Setup the report viewer object and get the array of bytes ReportViewer viewer = ReportViewer1; viewer.ProcessingMode = ProcessingMode.Local; viewer.LocalReport.ReportPath = "Diaxeirisi/ToELAS.rdlc"; byte[] bytes = viewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamIds, out warnings); // Now that you have all the bytes representing the PDF report, buffer it and send it to the client. Response.Buffer = true; Response.Clear(); Response.ContentType = mimeType; Response.AddHeader("content-disposition", "attachment; filename=PDF" + "." + extension); Response.BinaryWrite(bytes); // create the file Response.Flush(); // send it to the client to download Response.End(); Pass_kinisi.DataBind(); GridView3.DataBind(); } }