protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e) { DropDownList3.Items.Clear(); GR_Eisprajeis.DataBind(); Button1.Enabled = false; DropDownList4.Enabled = false; if (DropDownList2.SelectedValue == "0") { DropDownList3.Enabled = true; DropDownList3.Items.Add(new ListItem("Επιλογή...", "0")); DropDownList3.Items.Add(new ListItem("Ιανουαρίου", "1")); DropDownList3.Items.Add(new ListItem("Φεβρουαρίου", "2")); DropDownList3.Items.Add(new ListItem("Μαρτίου", "3")); DropDownList3.Items.Add(new ListItem("Απριλίου", "4")); DropDownList3.Items.Add(new ListItem("Μαΐου", "5")); DropDownList3.Items.Add(new ListItem("Ιουνίου", "6")); DropDownList3.Items.Add(new ListItem("Ιουλίου", "7")); DropDownList3.Items.Add(new ListItem("Αυγούστου", "8")); DropDownList3.Items.Add(new ListItem("Σεπτεμβρίου", "9")); DropDownList3.Items.Add(new ListItem("Οκτωβρίου", "10")); DropDownList3.Items.Add(new ListItem("Νοεμβρίου", "11")); DropDownList3.Items.Add(new ListItem("Δεκεμβρίου", "12")); } else if (DropDownList2.SelectedValue == "1") { DropDownList3.Enabled = true; DropDownList3.Items.Add(new ListItem("Επιλογή...", "0")); DropDownList3.Items.Add(new ListItem("Α Τριμήνου", "13")); DropDownList3.Items.Add(new ListItem("Β Τριμήνου", "14")); DropDownList3.Items.Add(new ListItem("Γ Τριμήνου", "15")); DropDownList3.Items.Add(new ListItem("Δ Τριμήνου", "16")); } else if (DropDownList2.SelectedValue == "2") { DropDownList3.Enabled = true; DropDownList3.Items.Add(new ListItem("Επιλογή...", "0")); DropDownList3.Items.Add(new ListItem("Α Εξαμήνου", "17")); DropDownList3.Items.Add(new ListItem("Β Εξαμήνου", "18")); } else if (DropDownList2.SelectedValue == "3") { TextBox2.Text = "01/01/" + DropDownList8.SelectedValue; TextBox3.Text = "31/12/" + DropDownList8.SelectedValue; Button1.Enabled = true; DropDownList3.Enabled = false; DropDownList4.Items.Clear(); Code_Leitour.DataBind(); DropDownList4.Items.Add(new ListItem("Επιλογή Κωδικού...", "0")); DropDownList4.DataBind(); DropDownList4.Enabled = true; } if (TextBox27.Text == "1") { TextBox30.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isot_Mera(DateTime.Today.ToString("yyyy-MM-dd")).ToString(); } }
protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e) { GR_Eisprajeis.DataBind(); string Etos = DropDownList8.SelectedValue.ToString(); DropDownList4.Enabled = true; if (DropDownList3.SelectedValue == "1") { TextBox2.Text = "01/01/" + Etos; TextBox3.Text = "31/01/" + Etos; } else if (DropDownList3.SelectedValue == "2") { int YearY = Convert.ToInt32(Etos); int daysInFeb = System.DateTime.DaysInMonth(YearY, 2); TextBox2.Text = "01/02/" + Etos; TextBox3.Text = daysInFeb + "/02/" + Etos; } else if (DropDownList3.SelectedValue == "3") { TextBox2.Text = "01/03/" + Etos; TextBox3.Text = "31/03/" + Etos; } else if (DropDownList3.SelectedValue == "4") { TextBox2.Text = "01/04/" + Etos; TextBox3.Text = "30/04/" + Etos; } else if (DropDownList3.SelectedValue == "5") { TextBox2.Text = "01/05/" + Etos; TextBox3.Text = "31/05/" + Etos; } else if (DropDownList3.SelectedValue == "6") { TextBox2.Text = "01/06/" + Etos; TextBox3.Text = "30/06/" + Etos; } else if (DropDownList3.SelectedValue == "7") { TextBox2.Text = "01/07/" + Etos; TextBox3.Text = "31/07/" + Etos; } else if (DropDownList3.SelectedValue == "8") { TextBox2.Text = "01/08/" + Etos; TextBox3.Text = "31/08/" + Etos; } else if (DropDownList3.SelectedValue == "9") { TextBox2.Text = "01/09/" + Etos; TextBox3.Text = "30/09/" + Etos; } else if (DropDownList3.SelectedValue == "10") { TextBox2.Text = "01/10/" + Etos; TextBox3.Text = "31/10/" + Etos; } else if (DropDownList3.SelectedValue == "11") { TextBox2.Text = "01/11/" + Etos; TextBox3.Text = "30/11/" + Etos; } else if (DropDownList3.SelectedValue == "12") { TextBox2.Text = "01/12/" + Etos; TextBox3.Text = "31/12/" + Etos; } else if (DropDownList3.SelectedValue == "13") { TextBox2.Text = "01/01/" + Etos; TextBox3.Text = "31/03/" + Etos; } else if (DropDownList3.SelectedValue == "14") { TextBox2.Text = "01/04/" + Etos; TextBox3.Text = "30/06/" + Etos; } else if (DropDownList3.SelectedValue == "15") { TextBox2.Text = "01/07/" + Etos; TextBox3.Text = "30/09/" + Etos; } else if (DropDownList3.SelectedValue == "16") { TextBox2.Text = "01/10/" + Etos; TextBox3.Text = "31/12/" + Etos; } else if (DropDownList3.SelectedValue == "17") { TextBox2.Text = "01/01/" + Etos; TextBox3.Text = "30/06/" + Etos; } else if (DropDownList3.SelectedValue == "18") { TextBox2.Text = "01/07/" + Etos; TextBox3.Text = "31/12/" + Etos; } DropDownList4.Items.Clear(); Code_Leitour.DataBind(); DropDownList4.Items.Add(new ListItem("Επιλογή Κωδικού...", "0")); DropDownList4.DataBind(); if (DropDownList5.Items.Count > 1) { DropDownList5.SelectedValue = "10000"; } Check_Leit.DataBind(); Check_Leit_LC.DataBind(); Leitourgika.DataBind(); GridView1.DataBind(); }