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 || DropDownList9.SelectedIndex != 0)
                {
                    FET_kinisi.Insert();

                    Response.Redirect("FET_Management.aspx");
                }
            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (DropDownList2.Items.Count <= 1 || DropDownList2.SelectedValue == "10000000")
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                        "alertMessage",
                                                        "alert('Ελλιπή Στοιχεία !!!!');", true);
            }
            else
            {
                if (CheckBox1.Checked)
                {
                    TextBox131.Text = TextBox8.Text + " " + DateTime.Now.ToString("HH:mm:ss");
                }
                else
                {
                    TextBox131.Text = DateTime.Now.ToString();
                }
                if (FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isotimia() != 0 && FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isot_Mina() == 0)
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                            "alertMessage",
                                                            "alert(' Δεν έχει ορισθεί Ισοτιμία για τον μήνα');", true);
                }
                else
                {
                    if (TextBox128.Text == "1")
                    {
                        if (GridView4.Rows.Count > 0)
                        {
                            TextBox127.Text = ((Convert.ToDecimal(GridView4.Rows[0].Cells[0].Text))).ToString();
                        }
                    }
                    else
                    {
                        TextBox127.Text = "0.00";
                    }
                    TextBox12.Text = DateTime.Parse(TextBox124.Text).Year.ToString();
                    TextBox11.Text = DateTime.Parse(TextBox124.Text).Month.ToString();

                    int Etos_Y = DateTime.Parse(TextBox124.Text).Year;
                    TextBox9.Text  = GridView9.Rows[0].Cells[17].Text;
                    TextBox2.Text  = GridView9.Rows[0].Cells[16].Text;
                    TextBox10.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.XrisiTR(Etos_Y).ToString();



                    if (DropDownList2.SelectedValue == "10000000" || DropDownList2.SelectedValue == "0")
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                                "alertMessage",
                                                                "alert('Λάθος Επιλογή !!!!');", true);
                    }
                    else if ((Convert.ToDecimal(GridView1.Rows[0].Cells[0].Text)) - Convert.ToDecimal(TextBox121.Text) != 0)
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                                "alertMessage",
                                                                "alert('Δεν έχουν επιλεγεί σωστά ένσημα. Απαιτούμενο ποσό :  € " + (Convert.ToDecimal(GridView1.Rows[0].Cells[0].Text)) + " !!! ');", true);
                    }
                    else
                    {
                        if (GridView9.Rows[0].Cells[5].Text == "1" || GridView9.Rows[0].Cells[5].Text == "2" || GridView9.Rows[0].Cells[5].Text == "3" || GridView9.Rows[0].Cells[5].Text == "4" || GridView9.Rows[0].Cells[5].Text == "5")
                        {
                            Kin_Logariasmon.Insert();
                            ABE_KINISI.Insert();


                            GridView2.DataBind();
                            Fill_Textbox();
                            Arithmos_ABE();
                            ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                                    "alertMessage",
                                                                    "alert('Αριθμός ΑΒΕ :  " + Convert.ToString(Session["ABE_NUMBER"]) + " / " + Etos_Y + " ');window.open('Tameio.aspx','_self');", true);
                        }

                        if (GridView9.Rows[0].Cells[5].Text == "6")
                        {
                            Kin_Logariasmon.Insert();
                            Visa_kinisi.Insert();
                        }
                        if (GridView9.Rows[0].Cells[5].Text == "7")
                        {
                            TextBox121.Text = "5";
                            TextBox127.Text = (Convert.ToDecimal(TextBox121.Text) * FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isot_Mera(Convert.ToDateTime(TextBox8.Text).ToString("yyyy-MM-dd"))).ToString();
                            Kin_Logariasmon.Insert();
                            ABE_KINISI_WAIT_GRID.Insert();
                            Pass_kinisi.Insert();
                            Arithmos_ABE();

                            ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                                    "alertMessage",
                                                                    "alert('Αριθμός ΑΒΕ :  " + Convert.ToString(Session["ABE_NUMBER"]) + " / " + Etos_Y + " ');window.open('Tameio.aspx','_self');", true);
                        }
                        if (GridView9.Rows[0].Cells[5].Text == "8")
                        {
                            Kin_Logariasmon.Insert();
                            FET_kinisi.Insert();
                        }


                        ABE_KINISI_WAIT.Delete();
                        FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 4);
                    }
                }
                Ypoloipo_Ensimwn.DataBind();
                ABE_KINISI.DataBind();
                ABE_Cost.DataBind();
                ABE_KINISI_WAIT.DataBind();
                ABE_KINISI_WAIT_List.DataBind();
                ABE_KINISI_WAIT_GRID.DataBind();

                GridView3.DataBind();
                GridView9.DataBind();
                GridView1.DataBind();
                GridView4.DataBind();
                GridView10.DataBind();
            }
        }
示例#3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (CheckBox1.Checked)
            {
                TextBox131.Text = TextBox8.Text + " " + DateTime.Now.ToString("HH:mm:ss");
            }
            else
            {
                TextBox131.Text = DateTime.Now.ToString();
            }
            if (FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isotimia() != 0 && FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isot_Mina() == 0)
            {
                //    ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                //           "alertMessage",
                //         "alert(' Δεν έχει ορισθεί Ισοτιμία για τον μήνα');", true);
                Label3.Text          = "Δεν έχει ορισθεί Ισοτιμία για τον μήνα ";
                TextBox3.Visible     = false;
                TextBox3.Text        = "";
                Label4.Text          = "";
                Session["Update_YN"] = "0";
                ModalPopupExtender2.Show();
            }
            else
            {
                if (TextBox128.Text == "1")
                {
                    if (GridView4.Rows.Count > 0)
                    {
                        TextBox127.Text = ((Convert.ToDecimal(GridView4.Rows[0].Cells[0].Text))).ToString();
                    }
                }
                else
                {
                    TextBox127.Text = "0.00";
                }
                TextBox12.Text = DateTime.Parse(TextBox124.Text).Year.ToString();
                TextBox11.Text = DateTime.Parse(TextBox124.Text).Month.ToString();

                int Etos_Y = DateTime.Parse(TextBox124.Text).Year;
                TextBox9.Text  = GridView9.Rows[0].Cells[17].Text;
                TextBox2.Text  = GridView9.Rows[0].Cells[16].Text;
                TextBox10.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.XrisiTR(Etos_Y).ToString();


                if ((Convert.ToDecimal(GridView1.Rows[0].Cells[0].Text)) - Convert.ToDecimal(TextBox121.Text) != 0 && GridView9.Rows[0].Cells[20].Text == "0")
                {
                    //     ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                    //              "alertMessage",
                    //            "alert('Δεν έχουν επιλεγεί σωστά ένσημα. Απαιτούμενο ποσό :  € " + (Convert.ToDecimal(GridView1.Rows[0].Cells[0].Text)) + " !!! ');", true);
                    Label3.Text          = "Δεν έχουν επιλεγεί σωστά ένσημα. ";
                    TextBox3.Visible     = true;
                    TextBox3.Text        = Convert.ToDecimal(GridView1.Rows[0].Cells[0].Text).ToString();
                    Label4.Text          = "Απαιτούμενο ποσό :  €";
                    Session["Update_YN"] = "0";
                    ModalPopupExtender2.Show();
                }
                else
                {
                    if (GridView9.Rows[0].Cells[5].Text == "1" || GridView9.Rows[0].Cells[5].Text == "2" || GridView9.Rows[0].Cells[5].Text == "3" || GridView9.Rows[0].Cells[5].Text == "4" || GridView9.Rows[0].Cells[5].Text == "5")
                    {
                        Kin_Logariasmon.Insert();
                        ABE_KINISI.Insert();


                        GridView2.DataBind();
                        Fill_Textbox();
                        //      Arithmos_ABE();
                        ABE_KINISI_WAIT.Delete();
                        FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 4);

                        //   ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                        //                          "alertMessage",
                        //                                "alert('Αριθμός ΑΒΕ :  " + FINANCIAL_MANAGEMENT.App_Code.xrisi.ABE_KINISI_FOR_Kiosk(Convert.ToInt32(TextBox135.Text)) + " ');", true); ;
                        Label3.Text          = "Αριθμός ΑΒΕ :";
                        TextBox3.Visible     = true;
                        TextBox3.Text        = FINANCIAL_MANAGEMENT.App_Code.xrisi.ABE_KINISI_FOR_Kiosk(Convert.ToInt32(TextBox135.Text));
                        Label4.Text          = "";
                        Session["Update_YN"] = "1";
                        ModalPopupExtender2.Show();
                    }

                    if (GridView9.Rows[0].Cells[5].Text == "6")
                    {
                        Kin_Logariasmon.Insert();
                        Visa_kinisi.Insert();
                        ABE_KINISI_WAIT.Delete();
                        FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 4);
                        string path_return = "TameioN.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);
                    }
                    if (GridView9.Rows[0].Cells[5].Text == "7")
                    {
                        TextBox121.Text = "5";
                        TextBox127.Text = (Convert.ToDecimal(TextBox121.Text) * FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isot_Mera(Convert.ToDateTime(TextBox8.Text).ToString("yyyy-MM-dd"))).ToString();



                        if (GridView9.Rows[0].Cells[20].Text == "1")
                        {
                            TextBox141.Text = GridView9.Rows[0].Cells[21].Text;
                            Passport_K.Update();
                            ABE_KINISI_WAIT.Delete();

                            FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 4);
                            //     ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                            //        "alertMessage",
                            //             "alert('Η επιστροφή ολοκληρώθηκε με επιτυχία !');", true);
                            Label3.Text          = "Η επιστροφή ολοκληρώθηκε με επιτυχία !";
                            TextBox3.Visible     = false;
                            TextBox3.Text        = "";
                            Label4.Text          = "";
                            Session["Update_YN"] = "0";
                            ModalPopupExtender2.Show();
                        }
                        else if (GridView9.Rows[0].Cells[20].Text == "2")
                        {
                            FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 4);
                            TextBox141.Text = GridView9.Rows[0].Cells[21].Text;
                            Passport_K.Update();
                            Kin_Logariasmon.Insert();
                            ABE_KINISI_WAIT_GRID.Insert();
                            Pass_kinisi.Insert();
                            //        Arithmos_ABE();

                            ABE_KINISI_WAIT.Delete();


                            //       ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                            //         "alertMessage",
                            //               "alert('Αριθμός ΑΒΕ :  " + FINANCIAL_MANAGEMENT.App_Code.xrisi.ABE_KINISI_FOR_Kiosk(Convert.ToInt32(TextBox135.Text)) + " ');", true); ;
                            Label3.Text          = "Αριθμός ΑΒΕ :";
                            TextBox3.Visible     = true;
                            TextBox3.Text        = FINANCIAL_MANAGEMENT.App_Code.xrisi.ABE_KINISI_FOR_Kiosk(Convert.ToInt32(TextBox135.Text));
                            Label4.Text          = "";
                            Session["Update_YN"] = "1";
                            ModalPopupExtender2.Show();
                        }
                        else
                        {
                            FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 4);
                            Kin_Logariasmon.Insert();
                            ABE_KINISI_WAIT_GRID.Insert();
                            Pass_kinisi.Insert();
                            //        Arithmos_ABE();

                            ABE_KINISI_WAIT.Delete();


                            //            ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                            //                "alertMessage",
                            //                     "alert('Αριθμός ΑΒΕ :  " + FINANCIAL_MANAGEMENT.App_Code.xrisi.ABE_KINISI_FOR_Kiosk(Convert.ToInt32(TextBox135.Text)) + " ');", true); ;
                            Label3.Text          = "Αριθμός ΑΒΕ :";
                            TextBox3.Visible     = true;
                            TextBox3.Text        = FINANCIAL_MANAGEMENT.App_Code.xrisi.ABE_KINISI_FOR_Kiosk(Convert.ToInt32(TextBox135.Text));
                            Label4.Text          = "";
                            Session["Update_YN"] = "0";
                            ModalPopupExtender2.Show();
                        }
                    }
                    if (GridView9.Rows[0].Cells[5].Text == "8")
                    {
                        FINANCIAL_MANAGEMENT.App_Code.xrisi.Update_Reserv_Status(Convert.ToInt32(GridView9.Rows[0].Cells[18].Text), 4);
                        Kin_Logariasmon.Insert();
                        FET_kinisi.Insert();
                        ABE_KINISI_WAIT.Delete();

                        string path_return = "TameioN.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);
                    }
                }
            }
        }