Beispiel #1
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            Bring_Mont_O_C();

            if (Convert.ToInt16(TextBox20.Text) >= DateTime.Parse(TextBox12.Text).Month)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                        "alertMessage",
                                                        "alert('Ο μήνας έχει κλείσει δεν επιτρέπονται αλλαγές !!!!');", true);
            }
            else
            {
                if (TextBox13.Text.Length != 0 || DropDownList8.SelectedIndex != 0 || DropDownList9.SelectedIndex != 0)
                {
                    TextBox14.Text = "1";
                    Kinisi_Ensimou.Insert();
                    TextBox13.Text = "";
                    DropDownList8.SelectedIndex = 0;
                    DropDownList9.SelectedIndex = 0;
                }
            }
        }
Beispiel #2
0
        protected void Button4_Click(object sender, EventArgs e)
        {
            if (TextBox12.Text.Length == 0 || DropDownList8.SelectedIndex == 0 || TextBox13.Text.Length == 0)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                        "alertMessage",
                                                        "alert('Δεν έχουν συμπληρωθεί τα πεδία !!!!');", true);
            }
            else
            {
                if (GridView5.Rows[0].Cells[0].Text != " ")
                {
                    if (Convert.ToDecimal(TextBox13.Text) > Convert.ToDecimal(GridView5.Rows[0].Cells[0].Text))
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                                "alertMessage",
                                                                "alert('Το υπόλοιπο των ενσήμων δεν επαρκεί !!!!');", true);
                    }
                    else
                    {
                        Kinisi_Ensimou.Insert();
                        GridView5.DataBind();
                        GridView4.DataBind();

                        TextBox13.Text = "";
                        DropDownList8.SelectedIndex = 0;
                        DDL_Report.DataBind();
                        DropDownList9.DataBind();
                    }
                }
                else
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                            "alertMessage",
                                                            "alert('Το υπόλοιπο των ενσήμων δεν επαρκεί !!!!');", true);
                }
            }
        }
 protected void DropDownList8_SelectedIndexChanged(object sender, EventArgs e)
 {
     Kinisi_Ensimou.DataBind();
     GridView4.DataBind();
 }