Ejemplo n.º 1
0
        protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
        {
            //  if ((string)Session["Edit_YN"] == "0")
            //  {
            //      GridView12.DataSourceID = "Dikaiologitika_From_DDL";
            //       Dikaiologitika_From_DDL.DataBind();
            //    }
            if (DropDownList2.SelectedValue == "7" || DropDownList2.SelectedValue == "12" || DropDownList2.SelectedValue == "14" || DropDownList2.SelectedValue == "17" || DropDownList2.SelectedValue == "19")
            {
                CheckBox2.Visible = true;
            }
            else
            {
                CheckBox2.Visible = false;
                CheckBox2.Checked = false;
            }

            txbABE_Sub.Text = DropDownList2.SelectedValue.ToString();
            ABE_Category_Revers.DataBind();
            GridView9.DataBind();

            if (DropDownList2.SelectedValue != "0")
            {
                string DD2_index = DropDownList2.SelectedValue;

                DropDownList1.SelectedValue = GridView9.Rows[0].Cells[0].Text;
                ABE_Sub_Category.DataBind();
                DropDownList2.DataBind();

                DropDownList2.SelectedValue = DD2_index;
            }
            else
            {
                DropDownList1_SelectedIndexChanged(null, null);
            }

            ABE_Cost.DataBind();
            ABE_Cost_LC.DataBind();


            if (DropDownList1.SelectedValue == "4")
            {
                DropDownList111.Enabled = true;
            }
            else
            {
                DropDownList111.Enabled       = false;
                DropDownList111.SelectedIndex = 0;
            }
        }
        protected void Button2_Click(object sender, EventArgs e)
        {
            ABE_KINISI.DataBind();
            ABE_Cost.DataBind();
            ABE_KINISI_WAIT.DataBind();
            ABE_KINISI_WAIT_GRID.DataBind();

            GridView3.DataBind();
            GridView9.DataBind();
            GridView1.DataBind();
            GridView4.DataBind();
            GridView10.DataBind();
            DropDownList2.DataBind();
            dele_DDL();
        }
Ejemplo n.º 3
0
        protected void new_pers()
        {
            if (GridView11.Rows.Count > 0)
            {
                DropDownList1.SelectedValue = GridView11.Rows[0].Cells[1].Text;

                DropDownList2.SelectedValue = GridView11.Rows[0].Cells[3].Text.Replace(" ", "0");



                txbABE_Cat.Text = GridView11.Rows[0].Cells[1].Text;
                txbABE_Sub.Text = GridView11.Rows[0].Cells[3].Text.Replace(" ", "0");

                //      DropDownList3.SelectedItem.Text = GridView11.Rows[0].Cells[4].Text.Replace(" ", "Χειριστής...");

                TextBox13.Text  = GridView11.Rows[0].Cells[12].Text.Replace(" ", "");
                TextBox138.Text = GridView11.Rows[0].Cells[13].Text.Replace(" ", "");
                TextBox139.Text = GridView11.Rows[0].Cells[23].Text.Replace(" ", "");

                TextBox140.Text = GridView11.Rows[0].Cells[18].Text.Replace("01/01/1900", "");

                TextBox141.Text = GridView11.Rows[0].Cells[17].Text.Replace(" ", "");
                TextBox142.Text = GridView11.Rows[0].Cells[15].Text.Replace(" ", "");
                TextBox143.Text = GridView11.Rows[0].Cells[16].Text.Replace(" ", "");
                TextBox152.Text = GridView11.Rows[0].Cells[1].Text.Replace(" ", "");
                TextBox183.Text = GridView11.Rows[0].Cells[29].Text.Replace(" ", "0");

                TextBox9.Text = GridView11.Rows[0].Cells[12].Text.Replace(" ", "") + "  " + GridView11.Rows[0].Cells[13].Text.Replace(" ", "");

                //                     GridView11.SelectedRow.Cells[17].Text;


                //      ABE_Category.DataBind();
                //     DropDownList1.DataBind();

                ABE_Cost.DataBind();
                ABE_Cost_LC.DataBind();
                GridView1.DataBind();
                GridView4.DataBind();
            }
        }
        protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (DropDownList2.SelectedValue != "10000000")
            {
                ABE_KINISI.DataBind();
                ABE_Cost.DataBind();
                ABE_KINISI_WAIT.DataBind();
                ABE_KINISI_WAIT_GRID.DataBind();

                GridView3.DataBind();
                GridView9.DataBind();
                GridView1.DataBind();
                GridView4.DataBind();
                GridView10.DataBind();
                dele_DDL();


                ShowDDL();
                GridView10.SelectedIndex = -1;
                GridView10.DataBind();

                if (GridView9.Rows[0].Cells[5].Text == "6" || GridView9.Rows[0].Cells[5].Text == "7" || GridView9.Rows[0].Cells[5].Text == "8")
                {
                    Dis_Area();
                    TextBox121.Text      = GridView9.Rows[0].Cells[9].Text;
                    TextBox133.Text      = GridView9.Rows[0].Cells[10].Text;
                    TextBox121.BackColor = System.Drawing.ColorTranslator.FromHtml("#006600");
                    TextBox125.BackColor = System.Drawing.ColorTranslator.FromHtml("#006600");
                    TextBox133.BackColor = System.Drawing.ColorTranslator.FromHtml("#006600");
                    TextBox134.BackColor = System.Drawing.ColorTranslator.FromHtml("#006600");
                }
                else
                {
                    Enab_Area();
                }
            }
        }
        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();
            }
        }
Ejemplo n.º 6
0
 protected void DropDownList111_SelectedIndexChanged(object sender, EventArgs e)
 {
     ABE_Cost.DataBind();
     ABE_Cost_LC.DataBind();
 }