protected void Button4_Click(object sender, EventArgs e) { if (TextBox13.Text.Length == 0 || TextBox138.Text.Length == 0 || TextBox7.Text.Length == 0 || TextBox24.Text.Length == 0 || TextBox158.Text.Length == 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Ελλιπή Στοιχεία !!!!');", true); } else { TextBox12.Text = DateTime.Parse(TextBox124.Text).Year.ToString(); TextBox11.Text = DateTime.Parse(TextBox124.Text).Month.ToString(); if (FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_GR_exists_YN(DateTime.Parse(TextBox151.Text).Year, Convert.ToInt16(TextBox158.Text)) == 0) { if ((string)Session["ID_Pers_NEWPERS"] == "XXX") { TextBox133.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_MAX_Reservation().ToString(); } xrisi(); TextBox153.Text = "5"; Esoda_Arxis.Insert(); Kin_Logariasmon.Insert(); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Επιτυχής Πληρωμή!!');", true); Session["ID_Pers_NEWPERS"] = "X"; string path_return = "/Diaxeirisi/Kinisis.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); } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Το Γραμμάτιο έχει ήδη κοπεί !!!');", true); } } }
protected void Button1_Click(object sender, EventArgs e) { var xx = DateTime.Parse(TextBox8.Text).Month.ToString(); if (xx == DropDownList5.SelectedValue) { if (Convert.ToDecimal(TextBox9.Text) != 0 || Convert.ToDecimal(TextBox13.Text) != 0) { for (int i = 0; i < GridView1.Rows.Count; i++) { var chk = (System.Web.UI.WebControls.CheckBox)(GridView1.Rows[i].Cells[0].FindControl("O_C_CHECK")); if (chk.Checked) { TextBox11.Text = GridView1.Rows[i].Cells[9].Text; Passport_3y.Update(); } } Esoda_Arxis.Insert(); Kin_Logariasmon.Insert(); Response.Redirect("Esoda.aspx"); } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('! Δεν υπάρχουν/επιλεγεί διαβατήρια προς μεταφορά !');", true); } } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('! Έχει επιλεγεί Μήνας διαφορετικός από την Ημερομηνία !');", true); } }
protected void Button1_Click(object sender, EventArgs e) { Session["New_ypologo_MultyBanks"] = DropDownList9.SelectedValue; if (CheckBox1.Checked) { TextBox15.Text = DropDownList4.Text; } else { TextBox15.Text = TextBox14.Text; } Esoda_Arxis.DataBind(); if (DropDownList8.SelectedValue == "0" || DropDownList9.SelectedValue == "0" || (TextBox25.Text == "0" && TextBox7.Text.Length == 0 && FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Xrisi_USD() == 0) || (TextBox25.Text == "1" && (TextBox24.Text.Length == 0 && TextBox7.Text.Length == 0) && FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Xrisi_USD() == 0) || DropDownList5.SelectedValue == "0" || TextBox15.Text == "0" || TextBox8.Text.Length == 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Δεν έχει συμπληρωθεί το Έτος ή το Είδος Εσόδου ή το Ποσό ή Δεν έχει επιλεγεί Μήνας Εσόδου !!!!');", true); } else { TextBox18.Text = "28/" + DropDownList5.Text + "/" + DropDownList8.Text; DateTime dateTime = Convert.ToDateTime(this.TextBox18.Text.Trim(), new CultureInfo("en-GB")); this.TextBox18.Text = dateTime.AddDays(30).ToString("dd/MM/yyyy"); if (Convert.ToDateTime(TextBox8.Text) < Convert.ToDateTime(TextBox18.Text)) { if (DropDownList9.SelectedValue == "12") { Proig_Diax_Met_GR.Delete(); Proig_Diax_Met_GR.Update(); Proig_Diax_Met_GR.Insert(); if (TextBox16.Text == "1") { TextBox19.Text = "1"; } else { TextBox19.Text = (Convert.ToInt16(TextBox19.Text) + 1).ToString(); } Session["Ypo_GR_Etos"] = DropDownList8.Text; Session["Ypol_GR"] = TextBox5.Text; Session["Ypol_Xrisi"] = TextBox19.Text; if (TextBox20.Text == "1") { Gr_leitourgikwn.Insert(); Gr_leitourgikwn.Delete(); } if (TextBox21.Text == "1") { Gr_DimosiesS.Insert(); } Nea_Xrisi.Delete(); Nea_Xrisi.Update(); Nea_Xrisi.Insert(); } else { if (FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isotimia() == 1) { decimal isot; if (DropDownList9.SelectedValue == "11") { isot = FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isot_Mera_Theti(TextBox27.Text); } else { isot = FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isot_Mera(TextBox27.Text); } if (TextBox7.Text.Length == 0 && TextBox30.Text.Length == 0) { TextBox7.Text = Math.Round((Convert.ToDecimal(TextBox24.Text) / isot), 2).ToString(); } if (TextBox24.Text.Length == 0 && TextBox30.Text.Length == 0) { TextBox24.Text = Math.Round((Convert.ToDecimal(TextBox7.Text) * isot), 2).ToString(); } } } if (DropDownList9.SelectedValue == "20") { Tokoi.Insert(); } else { Esoda_Arxis.Insert(); } // if (DropDownList9.SelectedValue != "12") // { if (!CheckBox2.Checked) { Kin_Logariasmon.Insert(); if (DropDownList9.SelectedValue != "20") { Del_Esoda_log.Insert(); } } else { Session["Etos"] = DropDownList8.Text; Session["Month"] = DropDownList5.Text; Session["Xrisi"] = TextBox19.Text; Session["Desc"] = TextBox6.Text; Session["GR_eisp"] = TextBox5.Text; Session["Poso"] = TextBox7.Text; Session["Poso_LC"] = TextBox24.Text; Session["Date_Apost"] = TextBox8.Text; Session["Date_Entry"] = TextBox10.Text; ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "var Mleft = (screen.width/2)-(730/2);var Mtop = (screen.height/2)-(600/2);window.open( '../Esoda/Multy_Logariasmoi.aspx', null, 'height=550,width=660,status=yes,toolbar=no,scrollbars=yes,menubar=no,location=no, left=\'+Mleft+\'' );", true); } // } // Logariasmoi.Update(); if (DropDownList9.SelectedValue == "12") { // Session["Ypo_GR_Etos"] = DropDownList8.Text; // Session["Ypol_GR"] = TextBox5.Text; // Session["Ypol_Xrisi"] = TextBox19.Text; // Server.Transfer("~/Esoda/Delete_Last_GR.aspx"); ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "var Mleft = (screen.width/2)-(760/2);var Mtop = (screen.height/2)-(700/2);window.open( 'Neos_Ypologos_Alagi_Xrisi.aspx', null, 'height=800,width=793,status=no,toolbar=no,scrollbars=yes,menubar=no,location=no, left=\'+Mleft+\'' );", true); } else { if (!CheckBox2.Checked) { Response.Redirect("Esoda.aspx"); } } Button1.Enabled = false; Button3.Enabled = false; Button4.Visible = false; } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Λανθασμένη επιλογή Ημερομηνίας - Δεν μπορεί να επιλεγεί μήνας προγενέστερος του τελευταίου καταχωρημένου Γραμματείου !!!');", true); } } Esoda_Arxis.DataBind(); Esoda_Arxis_Tokoi.DataBind(); }