protected void Button1_Click(object sender, EventArgs e) { if (DropDownList2.Items.Count <= 1 || DropDownList2.SelectedValue == "10000000") { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Ελλιπή Στοιχεία !!!!');", true); } else { if (CheckBox1.Checked) { TextBox131.Text = TextBox8.Text + " " + DateTime.Now.ToString("HH:mm:ss"); } else { TextBox131.Text = DateTime.Now.ToString(); } if (FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isotimia() != 0 && FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isot_Mina() == 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert(' Δεν έχει ορισθεί Ισοτιμία για τον μήνα');", true); } else { if (TextBox128.Text == "1") { if (GridView4.Rows.Count > 0) { TextBox127.Text = ((Convert.ToDecimal(GridView4.Rows[0].Cells[0].Text))).ToString(); } } else { TextBox127.Text = "0.00"; } TextBox12.Text = DateTime.Parse(TextBox124.Text).Year.ToString(); TextBox11.Text = DateTime.Parse(TextBox124.Text).Month.ToString(); int Etos_Y = DateTime.Parse(TextBox124.Text).Year; TextBox9.Text = GridView9.Rows[0].Cells[17].Text; TextBox2.Text = GridView9.Rows[0].Cells[16].Text; TextBox10.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.XrisiTR(Etos_Y).ToString(); if (DropDownList2.SelectedValue == "10000000" || DropDownList2.SelectedValue == "0") { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Λάθος Επιλογή !!!!');", true); } else if ((Convert.ToDecimal(GridView1.Rows[0].Cells[0].Text)) - Convert.ToDecimal(TextBox121.Text) != 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Δεν έχουν επιλεγεί σωστά ένσημα. Απαιτούμενο ποσό : € " + (Convert.ToDecimal(GridView1.Rows[0].Cells[0].Text)) + " !!! ');", true); } else { if (GridView9.Rows[0].Cells[5].Text == "1" || GridView9.Rows[0].Cells[5].Text == "2" || GridView9.Rows[0].Cells[5].Text == "3" || GridView9.Rows[0].Cells[5].Text == "4" || GridView9.Rows[0].Cells[5].Text == "5") { Kin_Logariasmon.Insert(); ABE_KINISI.Insert(); GridView2.DataBind(); Fill_Textbox(); Arithmos_ABE(); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Αριθμός ΑΒΕ : " + Convert.ToString(Session["ABE_NUMBER"]) + " / " + Etos_Y + " ');window.open('Tameio.aspx','_self');", true); } if (GridView9.Rows[0].Cells[5].Text == "6") { Kin_Logariasmon.Insert(); Visa_kinisi.Insert(); } if (GridView9.Rows[0].Cells[5].Text == "7") { TextBox121.Text = "5"; TextBox127.Text = (Convert.ToDecimal(TextBox121.Text) * FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isot_Mera(Convert.ToDateTime(TextBox8.Text).ToString("yyyy-MM-dd"))).ToString(); Kin_Logariasmon.Insert(); ABE_KINISI_WAIT_GRID.Insert(); Pass_kinisi.Insert(); Arithmos_ABE(); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Αριθμός ΑΒΕ : " + Convert.ToString(Session["ABE_NUMBER"]) + " / " + Etos_Y + " ');window.open('Tameio.aspx','_self');", true); } if (GridView9.Rows[0].Cells[5].Text == "8") { Kin_Logariasmon.Insert(); FET_kinisi.Insert(); } ABE_KINISI_WAIT.Delete(); FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 4); } } Ypoloipo_Ensimwn.DataBind(); ABE_KINISI.DataBind(); ABE_Cost.DataBind(); ABE_KINISI_WAIT.DataBind(); ABE_KINISI_WAIT_List.DataBind(); ABE_KINISI_WAIT_GRID.DataBind(); GridView3.DataBind(); GridView9.DataBind(); GridView1.DataBind(); GridView4.DataBind(); GridView10.DataBind(); } }
protected void Button1_Click(object sender, EventArgs e) { if (CheckBox1.Checked) { TextBox131.Text = TextBox8.Text + " " + DateTime.Now.ToString("HH:mm:ss"); } else { TextBox131.Text = DateTime.Now.ToString(); } if (FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isotimia() != 0 && FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isot_Mina() == 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert(' Δεν έχει ορισθεί Ισοτιμία για τον μήνα');", true); } else { if (TextBox128.Text == "1") { if (GridView4.Rows.Count > 0) { TextBox127.Text = ((Convert.ToDecimal(GridView4.Rows[0].Cells[0].Text))).ToString(); } } else { TextBox127.Text = "0.00"; } TextBox12.Text = DateTime.Parse(TextBox124.Text).Year.ToString(); TextBox11.Text = DateTime.Parse(TextBox124.Text).Month.ToString(); int Etos_Y = DateTime.Parse(TextBox124.Text).Year; TextBox9.Text = GridView9.Rows[0].Cells[17].Text; TextBox2.Text = GridView9.Rows[0].Cells[16].Text; TextBox10.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.XrisiTR(Etos_Y).ToString(); if ((Convert.ToDecimal(GridView1.Rows[0].Cells[0].Text)) - Convert.ToDecimal(TextBox121.Text) != 0 && GridView9.Rows[0].Cells[20].Text == "0") { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Δεν έχουν επιλεγεί σωστά ένσημα. Απαιτούμενο ποσό : € " + (Convert.ToDecimal(GridView1.Rows[0].Cells[0].Text)) + " !!! ');", true); } else { Kin_Logariasmon.Insert(); ABE_KINISI.Insert(); Fill_Textbox(); // ΓΙΑ ΤΙΣ ΕΠΟΜΕΝΕΣ ΦΟΡΕΣ ΛΟΟΠ if (Convert.ToInt32(DropDownList111.SelectedValue) > 1) { for (int i = 1; i < Convert.ToInt32(DropDownList111.SelectedValue); i++) { Kin_Logariasmon.Insert(); Reservations.Insert(); Num_of_Times.Insert(); Fill_Textbox(); } } FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 5); ReportViewer1.LocalReport.DataSources.Clear(); ReportDataSource rds1 = new ReportDataSource(); rds1.Name = "DataSet5"; rds1.Value = Reservations; ReportViewer1.LocalReport.DataSources.Add(rds1); ReportViewer1.LocalReport.Refresh(); ABE_KINISI_WAIT.Delete(); 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 = "Kiosk/Tameio/M_ABE.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(); } } }
protected void Button1_Click(object sender, EventArgs e) { if (CheckBox1.Checked) { TextBox131.Text = TextBox8.Text + " " + DateTime.Now.ToString("HH:mm:ss"); } else { TextBox131.Text = DateTime.Now.ToString(); } if (FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isotimia() != 0 && FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isot_Mina() == 0) { // ScriptManager.RegisterClientScriptBlock(this, this.GetType(), // "alertMessage", // "alert(' Δεν έχει ορισθεί Ισοτιμία για τον μήνα');", true); Label3.Text = "Δεν έχει ορισθεί Ισοτιμία για τον μήνα "; TextBox3.Visible = false; TextBox3.Text = ""; Label4.Text = ""; Session["Update_YN"] = "0"; ModalPopupExtender2.Show(); } else { if (TextBox128.Text == "1") { if (GridView4.Rows.Count > 0) { TextBox127.Text = ((Convert.ToDecimal(GridView4.Rows[0].Cells[0].Text))).ToString(); } } else { TextBox127.Text = "0.00"; } TextBox12.Text = DateTime.Parse(TextBox124.Text).Year.ToString(); TextBox11.Text = DateTime.Parse(TextBox124.Text).Month.ToString(); int Etos_Y = DateTime.Parse(TextBox124.Text).Year; TextBox9.Text = GridView9.Rows[0].Cells[17].Text; TextBox2.Text = GridView9.Rows[0].Cells[16].Text; TextBox10.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.XrisiTR(Etos_Y).ToString(); if ((Convert.ToDecimal(GridView1.Rows[0].Cells[0].Text)) - Convert.ToDecimal(TextBox121.Text) != 0 && GridView9.Rows[0].Cells[20].Text == "0") { // ScriptManager.RegisterClientScriptBlock(this, this.GetType(), // "alertMessage", // "alert('Δεν έχουν επιλεγεί σωστά ένσημα. Απαιτούμενο ποσό : € " + (Convert.ToDecimal(GridView1.Rows[0].Cells[0].Text)) + " !!! ');", true); Label3.Text = "Δεν έχουν επιλεγεί σωστά ένσημα. "; TextBox3.Visible = true; TextBox3.Text = Convert.ToDecimal(GridView1.Rows[0].Cells[0].Text).ToString(); Label4.Text = "Απαιτούμενο ποσό : €"; Session["Update_YN"] = "0"; ModalPopupExtender2.Show(); } else { if (GridView9.Rows[0].Cells[5].Text == "1" || GridView9.Rows[0].Cells[5].Text == "2" || GridView9.Rows[0].Cells[5].Text == "3" || GridView9.Rows[0].Cells[5].Text == "4" || GridView9.Rows[0].Cells[5].Text == "5") { Kin_Logariasmon.Insert(); ABE_KINISI.Insert(); GridView2.DataBind(); Fill_Textbox(); // Arithmos_ABE(); ABE_KINISI_WAIT.Delete(); FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 4); // ScriptManager.RegisterClientScriptBlock(this, this.GetType(), // "alertMessage", // "alert('Αριθμός ΑΒΕ : " + FINANCIAL_MANAGEMENT.App_Code.xrisi.ABE_KINISI_FOR_Kiosk(Convert.ToInt32(TextBox135.Text)) + " ');", true); ; Label3.Text = "Αριθμός ΑΒΕ :"; TextBox3.Visible = true; TextBox3.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.ABE_KINISI_FOR_Kiosk(Convert.ToInt32(TextBox135.Text)); Label4.Text = ""; Session["Update_YN"] = "1"; ModalPopupExtender2.Show(); } if (GridView9.Rows[0].Cells[5].Text == "6") { Kin_Logariasmon.Insert(); Visa_kinisi.Insert(); ABE_KINISI_WAIT.Delete(); FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 4); string path_return = "TameioN.aspx"; String x = "<script type='text/javascript'>window.opener.location.href='" + path_return + "';self.close();</script>"; ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "script", x, false); } if (GridView9.Rows[0].Cells[5].Text == "7") { TextBox121.Text = "5"; TextBox127.Text = (Convert.ToDecimal(TextBox121.Text) * FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isot_Mera(Convert.ToDateTime(TextBox8.Text).ToString("yyyy-MM-dd"))).ToString(); if (GridView9.Rows[0].Cells[20].Text == "1") { TextBox141.Text = GridView9.Rows[0].Cells[21].Text; Passport_K.Update(); ABE_KINISI_WAIT.Delete(); FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 4); // ScriptManager.RegisterClientScriptBlock(this, this.GetType(), // "alertMessage", // "alert('Η επιστροφή ολοκληρώθηκε με επιτυχία !');", true); Label3.Text = "Η επιστροφή ολοκληρώθηκε με επιτυχία !"; TextBox3.Visible = false; TextBox3.Text = ""; Label4.Text = ""; Session["Update_YN"] = "0"; ModalPopupExtender2.Show(); } else if (GridView9.Rows[0].Cells[20].Text == "2") { FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 4); TextBox141.Text = GridView9.Rows[0].Cells[21].Text; Passport_K.Update(); Kin_Logariasmon.Insert(); ABE_KINISI_WAIT_GRID.Insert(); Pass_kinisi.Insert(); // Arithmos_ABE(); ABE_KINISI_WAIT.Delete(); // ScriptManager.RegisterClientScriptBlock(this, this.GetType(), // "alertMessage", // "alert('Αριθμός ΑΒΕ : " + FINANCIAL_MANAGEMENT.App_Code.xrisi.ABE_KINISI_FOR_Kiosk(Convert.ToInt32(TextBox135.Text)) + " ');", true); ; Label3.Text = "Αριθμός ΑΒΕ :"; TextBox3.Visible = true; TextBox3.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.ABE_KINISI_FOR_Kiosk(Convert.ToInt32(TextBox135.Text)); Label4.Text = ""; Session["Update_YN"] = "1"; ModalPopupExtender2.Show(); } else { FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 4); Kin_Logariasmon.Insert(); ABE_KINISI_WAIT_GRID.Insert(); Pass_kinisi.Insert(); // Arithmos_ABE(); ABE_KINISI_WAIT.Delete(); // ScriptManager.RegisterClientScriptBlock(this, this.GetType(), // "alertMessage", // "alert('Αριθμός ΑΒΕ : " + FINANCIAL_MANAGEMENT.App_Code.xrisi.ABE_KINISI_FOR_Kiosk(Convert.ToInt32(TextBox135.Text)) + " ');", true); ; Label3.Text = "Αριθμός ΑΒΕ :"; TextBox3.Visible = true; TextBox3.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.ABE_KINISI_FOR_Kiosk(Convert.ToInt32(TextBox135.Text)); Label4.Text = ""; Session["Update_YN"] = "0"; ModalPopupExtender2.Show(); } } if (GridView9.Rows[0].Cells[5].Text == "8") { FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 4); Kin_Logariasmon.Insert(); FET_kinisi.Insert(); ABE_KINISI_WAIT.Delete(); string path_return = "TameioN.aspx"; String x = "<script type='text/javascript'>window.opener.location.href='" + path_return + "';self.close();</script>"; ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "script", x, false); } } } }
protected void Button1_Click(object sender, EventArgs e) { if (CheckBox2.Checked) { TextBox183.Text = "1"; } else { TextBox183.Text = "0"; } if (TextBox140.Text.Length == 0) { TextBox140.Text = "01/01/1900"; } TextBox148.Text = DateTime.ParseExact(TextBox140.Text, "dd/MM/yyyy", null).ToString(); if (DropDownList2.SelectedValue == "0") { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Ελλιπή Στοιχεία !!!!');", true); } else { TextBox131.Text = ((Convert.ToDecimal(GridView1.Rows[0].Cells[0].Text))).ToString(); TextBox132.Text = ((Convert.ToDecimal(GridView4.Rows[0].Cells[0].Text))).ToString(); TextBox133.Text = "3"; ABE_KINISI_WAIT.Update(); Dikaiologitika.Delete(); foreach (GridViewRow row in GridView12.Rows) { System.Web.UI.WebControls.CheckBox chkRow = (row.Cells[0].FindControl("O_C_CHECK") as System.Web.UI.WebControls.CheckBox); if (chkRow.Checked) { txbYN.Text = "1"; } else { txbYN.Text = "0"; } txbID_Proj.Text = row.Cells[2].Text; txbDikaiol_desc.Text = row.Cells[1].Text; Dikaiologitika.Insert(); } if (GridView1.Rows[0].Cells[0].Text == "0.00" && TextBox183.Text == "0") { TextBox133.Text = "4"; ABE_KINISI_FILL.Update(); ABE_Sub_Category.Update(); TextBox136.Text = DateTime.Now.ToString(); TextBox12.Text = DateTime.Parse(TextBox151.Text).Year.ToString(); TextBox11.Text = DateTime.Parse(TextBox151.Text).Month.ToString(); int Etos_Y = DateTime.Parse(TextBox151.Text).Year; TextBox10.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.XrisiTR(Etos_Y).ToString(); Kin_Logariasmon.Insert(); ABE_KINISI.Insert(); ABE_KINISI_WAIT.Delete(); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Αριθμός ΑΒΕ : " + FINANCIAL_MANAGEMENT.App_Code.xrisi.ABE_KINISI_FOR_Kiosk(Convert.ToInt32(TextBox135.Text)) + " ');", true); Session["Update_ABE_WAIT_Schedule"] = "0"; Button2_Click(null, null); } else if (GridView1.Rows[0].Cells[0].Text == "0.00" && TextBox183.Text == "1") { Session["ID_Pers_Check_Proj"] = TextBox135.Text; Session["Return_Path_for_Personel_Tameio"] = "/Kiosk/Kinisis_Kiosk.aspx"; ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "var Mleft = (screen.width/2)-(690/2);var Mtop = (screen.height-500)/2;window.open( '../Kiosk/Tameio/Tameio_Pay_Pollaples.aspx', null, 'height=770,width=1100,directories=no,titlebar=no,status=no,toolbar=no,scrollbars=no,menubar=no,location=no, left=\'+Mleft+\'' );", true); } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Η εγγραφή αποθηκεύτηκε επιτυχώς, Αναμονή Πληρωμής ');", true); Session["Update_ABE_WAIT_Schedule"] = "0"; Button2_Click(null, null); } } }