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);
         }
     }
 }
Exemplo n.º 2
0
 protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
 {
     DropDownList3.Items.Clear();
     DropDownList3.DataBind();
     DropDownList3.Items.Insert(0, new ListItem("Επιλογή Μηνός ...", String.Empty));
     DropDownList3.SelectedIndex = 0;
     DropDownList4.SelectedIndex = 0;
     DropDownList5.SelectedIndex = 0;
     TextBox3.Text = DropDownList1.Text;
     UpDate_Diax_O_C.DataBind();
 }
        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);
                }
            }
        }
Exemplo n.º 4
0
 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);
         }
     }
 }
Exemplo n.º 5
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     UpDate_Diax_O_C.Update();
     ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true);
 }