예제 #1
0
        protected void Button3_Click(object sender, EventArgs e)
        {
            GridView5.DataBind();
            if (TextBox28.Text == "1")
            {
                if (DropDownList3.SelectedValue == "0" || DropDownList2.SelectedValue == "4")
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                            "alertMessage",
                                                            "alert('Δεν έχει συμπληρωθεί το Έτος ή το Διάστημα !!!!!!');", true);
                }

                else
                {
                    TextBox10.Text = DropDownList8.SelectedValue;
                    TextBox11.Text = DropDownList5.SelectedValue;
                    Check_Leit.DataBind();
                    Check_Leit_LC.DataBind();
                    GridView3.DataBind();
                    GridView4.DataBind();
                }
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                        "alertMessage",
                                                        "alert('Δεν έχει επιλεγεί Γραμμάτιο Είσπραξης !!!!!!');", true);
            }
        }
예제 #2
0
 protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
 {
     DropDownList4.Items.Clear();
     Code_Leitour.DataBind();
     DropDownList4.Items.Add(new ListItem(" Επιλογή Kωδικού ...", "0"));
     DropDownList4.DataBind();
     Leitourgika_Search.DataBind();
     GridView2.DataBind();
     Check_Leit.DataBind();
     Check_Leit_LC.DataBind();
     GridView3.DataBind();
     GridView4.DataBind();
     Ypologos.DataBind();
     GridView5.DataBind();
 }
예제 #3
0
 protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     if (GridView1.Rows.Count == 1)
     {
         Gr_leitourgikwn.Delete();
         GridView5.DataBind();
         CheckBox2.Checked = false;
         TextBox28.Text    = "0";
         CheckBox2.Enabled = true;
         Check_Leit.DataBind();
         Check_Leit_LC.DataBind();
         GridView3.DataBind();
         GridView4.DataBind();
         DropDownList5.SelectedValue = "10000";
     }
 }
예제 #4
0
        protected void GridView5_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (GridView5.Rows.Count > 0)
            {
                TextBox14.Text = GridView5.Rows[0].Cells[1].Text;
                TextBox15.Text = GridView5.Rows[0].Cells[2].Text;
                DropDownList7.SelectedValue = GridView5.Rows[0].Cells[0].Text;
                DropDownList5.SelectedValue = GridView5.Rows[0].Cells[3].Text;
                TextBox11.Text = GridView5.Rows[0].Cells[3].Text;
                TextBox10.Text = GridView5.Rows[0].Cells[6].Text;
                TextBox9.Text  = GridView5.Rows[0].Cells[3].Text;
                TextBox29.Text = GridView5.Rows[0].Cells[7].Text;

                if (GridView5.Rows[0].Cells[5].Text != "0")
                {
                    CheckBox2.Checked = true;
                    TextBox28.Text    = "1";
                }
                else
                {
                    CheckBox2.Checked = false;
                    TextBox28.Text    = "0";
                }

                Check_Leit.DataBind();
                Check_Leit_LC.DataBind();

                if (String.IsNullOrEmpty(GridView5.Rows[0].Cells[3].Text.ToString()))
                {
                    DropDownList5.SelectedValue = GridView5.Rows[0].Cells[3].Text;
                }
                DropDownList6.SelectedValue = GridView5.Rows[0].Cells[4].Text;
                TextBox14.ReadOnly          = true;
                TextBox29.ReadOnly          = true;
                TextBox15.ReadOnly          = true;
                DropDownList7.Enabled       = false;
            }
            else
            {
                TextBox14.Text              = "";
                TextBox15.Text              = "";
                TextBox29.Text              = "";
                TextBox14.ReadOnly          = false;
                TextBox15.ReadOnly          = false;
                TextBox29.ReadOnly          = false;
                DropDownList7.SelectedValue = "0";
                DropDownList6.Enabled       = true;
                DropDownList7.Enabled       = true;
            }

            if (GridView1.Rows.Count > 0)
            {
                DropDownList5.Enabled = false;
                DropDownList6.Enabled = false;
                CheckBox2.Enabled     = false;
                //       CheckBox2.Checked = true;
            }
            else
            {
                DropDownList5.Enabled = false;
                DropDownList6.Enabled = true;
                CheckBox2.Enabled     = true;
                //      CheckBox2.Checked = false;
            }
        }
예제 #5
0
        protected void Button1_Click(object sender, EventArgs e)
        {
//    if (CheckBox2.Checked)
//    {

            TextBox13.Text = DropDownList6.SelectedValue;
//            }
//            else
//           {

//                TextBox13.Text = null;
//            }



            if (DropDownList4.SelectedValue == "0" || TextBox2.Text.Length == 0 || TextBox14.Text.Length == 0 || TextBox15.Text.Length == 0 || TextBox3.Text.Length == 0 || (TextBox5.Text.Length == 0 && TextBox27.Text == "0") || (TextBox26.Text.Length == 0 && TextBox27.Text == "1" && TextBox5.Text.Length == 0))
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                        "alertMessage",
                                                        "alert('Δεν έχει συνπληρωθει το Έτος ή ο Κωδικός ή το Ποσό ή το Όνομα ή το Επώνυμο ή ο Βαθμός!!!!!!');", true);
            }
            else
            {
                TextBox6.Text = DateTime.Now.ToString();
                if (FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isotimia() == 1 && (TextBox5.Text == "0" || TextBox5.Text.Length == 0))
                {
                    TextBox5.Text = (Convert.ToDecimal(TextBox26.Text) / Convert.ToDecimal(TextBox30.Text)).ToString();
                }
                if (FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isotimia() == 1 && (TextBox26.Text == "0" || TextBox26.Text.Length == 0))
                {
                    TextBox26.Text = (Convert.ToDecimal(TextBox5.Text) * Convert.ToDecimal(TextBox30.Text)).ToString();
                }

                Leitourgika.Insert();
                Gr_leitourgikwn.Insert();



                TextBox4.Text    = "";
                TextBox5.Text    = "";
                TextBox26.Text   = "";
                TextBox7.Enabled = false;
                TextBox7.Text    = "0.00";
                DropDownList4.Items.Clear();
                Code_Leitour.DataBind();
                DropDownList4.Items.Insert(0, new ListItem("Επιλογή Κωδικού ...", "0"));
                DropDownList4.DataBind();
                Button1.Enabled = true;
                Leitourgika_Search.DataBind();
                GridView2.DataBind();


                if (GridView1.Rows.Count > 0)
                {
                    TextBox14.ReadOnly    = true;
                    TextBox15.ReadOnly    = true;
                    DropDownList7.Enabled = false;
                }
            }

            Check_Leit.DataBind();
            Check_Leit_LC.DataBind();
            GridView3.DataBind();
            GridView4.DataBind();
            Ypologos.DataBind();
            GridView5.DataBind();
        }
예제 #6
0
        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();
        }