Ejemplo n.º 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (DropDownList3.SelectedValue == "1")
            {
                Pass3years.Update();
                Pass_Update_M_Back.Update();
                Response.Redirect("Pass_Pol_Reply_K.aspx");
            }
            else
            {
                if (DropDownList1.SelectedValue == "0" || DropDownList2.SelectedValue == "10")
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                            "alertMessage",
                                                            "alert('Δεν έχει επιλεγεί Διαβατήριο ή Κατάσταση !!!!');", true);
                }
                else
                {
                    if (Convert.ToDateTime(TextBox17.Text) > Convert.ToDateTime(TextBox8.Text))
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                                "alertMessage",
                                                                "alert('Λανθασμένη ημερομηνία απάντησης, προγενέστερη της αίτησης!!!!');", true);
                    }
                    else
                    {
                        if (DropDownList2.SelectedValue == "1")
                        {
                            Kin_Logariasmon.Insert();
                        }
                        if (DropDownList2.SelectedValue == "2")
                        {
                            Pass3years.Insert();
                        }
                        DropDownList2.Enabled = true;
                        DropDownList1.Enabled = true;
                        DropDownList3.Enabled = true;
                        Pass_kinisi.Update();

                        Response.Redirect("Pass_Pol_Reply_K.aspx");
                    }
                }
            }
        }
 protected void Button2_Click(object sender, EventArgs e)
 {
     Pass3years.Insert();
     Pass3years.Update();
     GridView1.DataBind();
 }