示例#1
0
 protected void btn_EvalutionAll_Click(object sender, EventArgs e)
 {
     img_ExportToExcel1.Visible = false;
     img_ExportToExcel2.Visible = false;
     img_ExportToExcel3.Visible = false;
     img_ExportToExcel4.Visible = false;
     //this.StiWebViewer1.ResetReport();
     if (ddl_Term.SelectedValue == null || ddl_Term.SelectedValue == "0")
     {
         RadWindowManager1.RadAlert("لطفا ترم را انتخاب بفرمایید", 0, 100, "پیام", "");
     }
     else
     {
         if (txt_CodeOstad.Text == string.Empty)
         {
             txt_CodeOstad.Text = "0";
         }
         if (ddl_CodeGroup.SelectedValue == null)
         {
             ddl_CodeGroup.SelectedValue = "0";
         }
         if (ddl_CodeDras.SelectedValue == null)
         {
             ddl_CodeDras.SelectedValue = "0";
         }
         Order = 1;
         dt    = FRB.GetEvalutionProfDividedODDQ(ddl_Term.SelectedValue, int.Parse(txt_CodeOstad.Text), int.Parse(ddl_CodeGroup.SelectedValue), int.Parse(ddl_CodeDras.SelectedValue), Order);
         if (dt.Rows.Count == 0)
         {
             RadWindowManager1.RadAlert("رکوردی وجود ندارد", 0, 100, "پیام", "");
         }
         else
         {
             img_ExportToExcel4.Visible = true;
             this.StiWebViewer1.ResetReport();
             StiReport rpt = new StiReport();
             rpt.Load(Server.MapPath("../Report/ReportEvalutionProfDividedODDQ.mrt"));
             rpt.ReportCacheMode = StiReportCacheMode.On;
             rpt.Dictionary.Databases.Clear();
             rpt.Dictionary.Databases.Add(new StiSqlDatabase("Connection1", CB.ReportConnection.ToString()));
             rpt.Compile();
             rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODDQ]"].Parameters["@Term"].ParameterValue      = ddl_Term.SelectedValue;
             rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODDQ]"].Parameters["@CodeOstad"].ParameterValue = int.Parse(txt_CodeOstad.Text);
             rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODDQ]"].Parameters["@Lesson"].ParameterValue    = int.Parse(ddl_CodeDras.SelectedValue);
             rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODDQ]"].Parameters["@Departman"].ParameterValue = int.Parse(ddl_CodeGroup.SelectedValue);
             rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODDQ]"].Parameters["@Order"].ParameterValue     = Order;
             ((StiSqlSource)rpt.Dictionary.DataSources["[Faculty].[SP_EvalutionProfDividedODDQ]"]).CommandTimeout = 30000;
             rpt.RegData(dt);
             rpt.Dictionary.Synchronize();
             //rpt.Show();
             StiWebViewer1.Report  = rpt;
             StiWebViewer1.Visible = true;
             //rpt.Print(true);
         }
         if (txt_CodeOstad.Text == "0" || txt_CodeOstad.Text == "")
         {
             txt_CodeOstad.Text    = "";
             Session["code_ostad"] = null;
         }
     }
     //txt_CodeOstad.Text = "";
     Session["code_ostad"] = null;
 }
示例#2
0
 protected void btn_EvalutionAll_Click(object sender, EventArgs e)
 {
     if (TED.Term == null)
     {
         RadWindowManager1.RadAlert("لطفا ترم را انتخاب بفرمایید", 0, 100, "پیام", "");
     }
     else
     {
         if (txt_CodeOstad.Text == string.Empty)
         {
             txt_CodeOstad.Text = "0";
         }
         if (TED.Departman == null)
         {
             TED.Departman = "0";
         }
         if (TED.Lesson == null)
         {
             TED.Lesson = "0";
         }
         //if (chk_NameOstad.Checked == true && chk_ScoreOstad.Checked == false)
         //{
         //    Order = 1;
         //}
         //if (chk_NameOstad.Checked == false && chk_ScoreOstad.Checked == true)
         //{
         //    Order = 2;
         //}
         //if (chk_NameOstad.Checked == true && chk_ScoreOstad.Checked == true)
         //{
         //    Order = 3;
         //}
         //if (chk_NameOstad.Checked == false && chk_ScoreOstad.Checked == false)
         //{
         //    Order = 1;
         //}
         Order = 1;
         dt    = FRB.GetEvalutionProfDividedODDQ(TED.Term, int.Parse(txt_CodeOstad.Text), int.Parse(TED.Departman), int.Parse(TED.Lesson), Order);
         if (dt.Rows.Count == 0)
         {
             RadWindowManager1.RadAlert("رکوردی وجود ندارد", 0, 100, "پیام", "");
         }
         else
         {
             this.StiWebViewer1.ResetReport();
             StiReport rpt = new StiReport();
             rpt.Load(Server.MapPath("../Report/ReportEvalutionProfDividedODDQ.mrt"));
             rpt.ReportCacheMode = StiReportCacheMode.On;
             rpt.Dictionary.Databases.Clear();
             rpt.Dictionary.Databases.Add(new StiSqlDatabase("Connection1", CB.ReportConnection.ToString()));
             rpt.Compile();
             rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODDQ]"].Parameters["@Term"].ParameterValue      = TED.Term;
             rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODDQ]"].Parameters["@CodeOstad"].ParameterValue = int.Parse(txt_CodeOstad.Text);
             rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODDQ]"].Parameters["@Lesson"].ParameterValue    = int.Parse(TED.Lesson);
             rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODDQ]"].Parameters["@Departman"].ParameterValue = int.Parse(TED.Departman);
             rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODDQ]"].Parameters["@Order"].ParameterValue     = Order;
             ((StiSqlSource)rpt.Dictionary.DataSources["[Faculty].[SP_EvalutionProfDividedODDQ]"]).CommandTimeout = 30000;
             rpt.RegData(dt);
             rpt.Dictionary.Synchronize();
             StiWebViewer1.Report  = rpt;
             StiWebViewer1.Visible = true;
         }
         if (txt_CodeOstad.Text == "0" || txt_CodeOstad.Text == "")
         {
             txt_CodeOstad.Text    = "";
             Session["code_ostad"] = null;
         }
     }
     Session["code_ostad"] = null;
 }