示例#1
0
 protected void Button3_Click(object sender, EventArgs e)
 {
     Metafora_Select.Delete();
     Session["Flag_Esoda_Gram"] = 0;
     Response.Redirect("~/Esoda/Esoda.aspx");
     Session["First_page_acc"] = 0;
 }
示例#2
0
        protected void DropDownList4_SelectedIndexChanged(object sender, EventArgs e)
        {
            GridView6.DataSource = null;
            TextBox30.Text       = DropDownList4.SelectedValue;

            TextBox15.Text = "0";
            TextBox17.Text = "0";


            null_Sum();
            DropDownList5.Items.Clear();


            GridView5.DataBind();

            DropDownList7.SelectedValue = "0";
            if (DropDownList4.SelectedValue != "0")

            {
                Metafora_Selected.Insert();
            }

            Metafora_Select.DataBind();
            Metafora_Selected.DataBind();
            DropDownList4.DataBind();
            GridView4.DataBind();
        }
示例#3
0
 protected void GridView7_SelectedIndexChanged(object sender, EventArgs e)
 {
     DropDownList7.SelectedValue = "0";
     null_Sum();
     TextBox20.Text = "";
     TextBox2.Text  = "";
     DropDownList5.Items.Clear();
     Metafora_Selected.DataBind();
     Metafora_Select.DataBind();
     DropDownList4.DataBind();
 }
示例#4
0
        protected void kataxorisi()
        {
            if (GridView1.Rows.Count == 0)
            {
                TextBox19.Text = "0";
                TextBox22.Text = "0";
            }



            if (GridView1.Rows.Count > 0 || GridView2.Rows.Count > 0)
            {
                if (DropDownList4.Items.Count == 8 || DropDownList6.SelectedValue == "0" || TextBox28.Text == "" || DropDownList5.SelectedValue == "0")
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                            "alertMessage",
                                                            "alert('Δεν έχει επιλεγεί Έτος ή Έσοδο ή Τρίμηνο ή ο Μήνας Υπολογισμού!!!!');", true);
                }
                else
                {
                    if (GridView5.Rows.Count > 0)
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                                "alertMessage",
                                                                "alert(' Υπάρχουν Προξενικά Έσοδα προηγούμενου διαστήματος, που δεν έχουν μεταφερθεί στα έσοδα!!!!');", true);
                    }
                    else
                    {
                        Esoda.Insert();



                        for (int i = 0; i < GridView6.Rows.Count; i++)
                        {
                            var chk = (System.Web.UI.WebControls.CheckBox)(GridView6.Rows[i].Cells[0].FindControl("O_C_CHECK"));

                            if (chk.Checked)
                            {
                                TextBox31.Text = GridView6.Rows[i].Cells[6].Text;
                                TextBox32.Text = GridView6.Rows[i].Cells[7].Text;
                                TextBox37.Text = GridView6.Rows[i].Cells[8].Text;

                                Metafora_GR.Insert();
                                Pass_Visa_Ensima_AN.Update();


                                if (TextBox32.Text == "1")
                                {
                                    Ensimo.Update();
                                }
                                else if (TextBox32.Text == "2")
                                {
                                    Passport.Update();
                                }
                                else if (TextBox32.Text == "3")
                                {
                                    Post_P.Update();
                                }
                                else if (TextBox32.Text == "4")
                                {
                                    Visa.Update();
                                }
                                else if (TextBox32.Text == "5")
                                {
                                    FET.Update();
                                }
                                else if (TextBox32.Text == "6")
                                {
                                    Tokon.Update();
                                }
                                else if (TextBox32.Text == "7")
                                {
                                    Nautiliaka.Update();
                                }
                            }
                        }

                        Metafora_Select.Update(); // einai delete
                        Metafora_Select.Delete();
                        Session["First_page_acc"]  = 0;
                        Session["Flag_Esoda_Gram"] = 0;

                        Response.Redirect("~/Esoda/Esoda.aspx");
                    }
                }
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                        "alertMessage",
                                                        "alert('Δεν Υπάρχουν εισπράξεις !!!!');", true);
            }
        }
示例#5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.MaintainScrollPositionOnPostBack = true;
            int times_in = Convert.ToInt16(Session["First_page_acc"]);

            if (times_in == 0)
            {
                Metafora_Select.Delete();
            }
            times_in = times_in + 1;

            TextBox25.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isotimia().ToString();

            TextBox5.Attributes.Add("readonly", "readonly");

            if (TextBox5.Text.Length == 0)
            {
                TextBox5.Text  = DateTime.Today.ToString("dd/MM/yyyy");
                TextBox21.Text = DateTime.Today.ToString("dd/MM/yyyy");
                TextBox8.Text  = DateTime.Now.ToString();
            }

            if (TextBox25.Text == "0")
            {
                GridView2.Visible = false;
            }
            else
            {
                GridView2.Visible = true;
            }

            if ((int)Session["Flag_Esoda_Gram"] != 0)
            {
                int DD4_Select = (int)Session["Flag_Esoda_Gram"];

                TextBox30.Text = ((int)Session["Flag_Esoda_Gram"]).ToString();
                //    DropDownList3.SelectedValue = (string)Session["Etos_Pass"];
                DropDownList3.Items.Clear();
                DropDownList3.DataBind();
                DropDownList3.Items.Insert(1, new ListItem(((string)Session["Etos_Pass"]), "1"));
                DropDownList3.SelectedIndex = 1;
                TextBox28.Text        = (string)Session["Etos_Pass"];
                TextBox29.Text        = (string)Session["Eidos_Es"];
                DropDownList3.Enabled = false;
                int etos1 = Convert.ToInt16((string)Session["Etos_Pass"]);
                TextBox11.Text          = FINANCIAL_MANAGEMENT.App_Code.xrisi.XrisiTR(etos1).ToString();
                TextBox12.Text          = FINANCIAL_MANAGEMENT.App_Code.xrisi.XrisiTR(etos1).ToString();
                DropDownList3.BackColor = System.Drawing.Color.LightGray;
                DropDownList4.BackColor = System.Drawing.Color.LightGray;
                Button3.Visible         = true;
                if (DD4_Select == 2 || DD4_Select == 3)
                {
                    if (times_in == 1)
                    {
                        TextBox30.Text = "2";
                        Metafora_Selected.Insert();
                        TextBox30.Text = "3";
                        Metafora_Selected.Insert();
                    }
                }
                else
                {
                    if (times_in == 1)
                    {
                        Metafora_Selected.Insert();
                    }
                }
            }
            else
            {
                Button3.Visible         = false;
                DropDownList3.Enabled   = true;
                DropDownList4.Enabled   = true;
                DropDownList3.BackColor = System.Drawing.Color.White;
                DropDownList4.BackColor = System.Drawing.Color.White;
                int etos = Convert.ToInt16(DropDownList3.SelectedValue);

                TextBox11.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.XrisiTR(etos).ToString();
                TextBox12.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.XrisiTR(etos).ToString();
            }

            if (FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Xrisi_mina_Tokon() == 0)
            {
                DropDownList4.Items.Remove(DropDownList4.Items.FindByValue("6"));
            }

            Session["First_page_acc"] = times_in;
        }