protected void Button4_Click(object sender, EventArgs e) { if (DropDownList4.SelectedValue == "0" || DropDownList5.SelectedValue.Length == 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('!!!! Δεν έχει επιλεγει Έτος ή Μήνας');", true); } else { if (TextBox2.Text == "12345") { TextBox3.Text = DropDownList4.SelectedValue; TextBox4.Text = Convert.ToString(Convert.ToInt16(DropDownList5.SelectedValue) - 1); UpDate_Diax_O_C.Update(); Esoda_Open.Update(); Response.Redirect("Kleisimo_Etous.aspx"); } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('!!!! Λάθος Κωδικός - Επεξεργασία !!!!');", true); } } }
protected void Button3_Click(object sender, EventArgs e) { TextBox3.Text = DropDownList3.SelectedValue; TextBox4.Text = DropDownList2.SelectedValue; if (DropDownList3.SelectedValue == "0" || DropDownList2.SelectedValue.Length == 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('!!!! Δεν έχει επιλεγει Έτος ή Μήνας');", true); } else { if (TextBox1.Text == "12345") { if (TextBox4.Text == "12") { UpDate_Diax_O_C.Update(); Esoda_Close.Update(); Response.Redirect("Kleisimo_Etous.aspx"); } else { UpDate_Diax_O_C.Insert(); UpDate_Diax_O_C.Update(); Response.Redirect("Kleisimo_Etous.aspx"); } } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('!!!! Λάθος Κωδικός - Κλείσιμο !!!!');", true); } } }
protected void Button2_Click(object sender, EventArgs e) { if (DropDownList4.SelectedValue.Length == 0 || DropDownList5.SelectedValue.Length == 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Δεν έχει επιλεγεί Έτος ή Διάστημα Λειτουργικών !!!!');", true); } else { if (TextBox2.Text == "12345") { UpDate_Diax_O_C.Update(); UpDate_Diax_O_C.Insert(); Response.Redirect("Leitourgika_Kleisimo.aspx"); } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('!!!! Λάθος Κωδικός - Επεξεργασία !!!!');", true); } } }
protected void Button1_Click(object sender, EventArgs e) { UpDate_Diax_O_C.Update(); ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true); }