コード例 #1
0
 protected void Button5_Click(object sender, EventArgs e)
 {
     if (TextBox11.Text.Length == 0 || TextBox12.Text.Length == 0)
     {
         ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                 "alertMessage",
                                                 "alert('Δεν έχει συμπληρωθεί το Γραμμάτιο ή το Έτος !!!!');", true);
     }
     else
     {
         if (TextBox5.Text.Length == 0 || TextBox6.Text.Length == 0)
         {
             ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                     "alertMessage",
                                                     "alert('Δεν έχει συμπληρωθεί η Ημεριμηνία του Εγγράφου ή ο Αριθμός Πρωτοκόλλου (ΑΣ) !!!!');", true);
         }
         else
         {
             if (DropDownList4.SelectedValue.Length == 0)
             {
                 ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                         "alertMessage",
                                                         "alert('Δεν έχει συμπληρωθεί ο Υπογράφων !!!!');", true);
             }
             else
             {
                 Diav_Gram_Eisp.Insert();
                 DropDownList6.DataBind();
             }
         }
     }
 }
コード例 #2
0
        protected void Button4_Click(object sender, EventArgs e)
        {
            TextBox12.Text = TextBox12.Text;
            TextBox11.Text = TextBox11.Text;
            TextBox7.Text  = TextBox7.Text;

            if (TextBox11.Text.Length == 0 || TextBox12.Text.Length == 0)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                        "alertMessage",
                                                        "alert('Δεν έχει συμπληρωθεί το Γραμμάτιο ή το Έτος !!!!');", true);
            }
            else
            {
                if (TextBox5.Text.Length == 0 || TextBox6.Text.Length == 0)
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                            "alertMessage",
                                                            "alert('Δεν έχει συμπληρωθεί η Ημεριμηνία του Εγγράφου ή ο Αριθμός Πρωτοκόλλου (ΑΣ) !!!!');", true);
                }
                else
                {
                    if (DropDownList4.SelectedValue.Length == 0)
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                                "alertMessage",
                                                                "alert('Δεν έχει συμπληρωθεί ο Υπογράφων !!!!');", true);
                    }
                    else
                    {
                        ReportViewer1.LocalReport.DataSources.Clear();
                        ReportDataSource rds2 = new ReportDataSource();

                        rds2.Name  = "DataSet1";
                        rds2.Value = Diav_Gram_Eisp_Select;
                        ReportViewer1.LocalReport.DataSources.Add(rds2);
                        ReportViewer1.LocalReport.Refresh();
                        ReportViewer1.LocalReport.Refresh();
                        Diav_Gram_Eisp.Insert();
                        Diav_Gram_Eisp.Update();
                    }
                }
            }
        }