コード例 #1
0
ファイル: reportView.aspx.cs プロジェクト: zxl881203/src
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         this.reportid = base.Request.QueryString["reportid"];
         this.sta      = 0;
         DataRow reportRow = QueryItemAction.GetReportRow(this.reportid);
         this.Lb_Title.Text = reportRow["Title"].ToString();
         int    n    = Convert.ToInt32(reportRow["headwidth"].ToString());
         string text = reportRow["Header"].ToString().Replace("[getdate()]", DateTime.Now.ToLongDateString());
         text = text.Replace("[yhmc]", com.jwsoft.pm.entpm.PageHelper.QueryUser(this, this.Session["yhdm"].ToString()));
         string[] array = text.Split(new char[]
         {
             ';'
         });
         try
         {
             this.Lb_H1.Text = array[0];
             this.Lb_H2.Text = array[1];
             this.Lb_H3.Text = array[2];
         }
         catch
         {
         }
         string text2 = reportRow["Footer"].ToString().Replace("[getdate()]", DateTime.Now.ToLongDateString());
         text2 = text2.Replace("[yhmc]", com.jwsoft.pm.entpm.PageHelper.QueryUser(this, this.Session["yhdm"].ToString()));
         string[] array2 = text2.Split(new char[]
         {
             ';'
         });
         try
         {
             this.Lb_F1.Text = array2[0];
             this.Lb_F2.Text = array2[1];
             this.Lb_F3.Text = array2[2];
         }
         catch
         {
         }
         if (this.Lb_Title.Text.Trim() == "")
         {
             this.TRTitle.Visible = false;
         }
         this.DG1.Width = n;
         if (this.Lb_F1.Text.Trim() == "" && this.Lb_F2.Text.Trim() == "" && this.Lb_F3.Text.Trim() == "")
         {
             this.TrFooter.Visible = false;
         }
         if (this.Lb_H1.Text.Trim() == "" && this.Lb_H2.Text.Trim() == "" && this.Lb_H3.Text.Trim() == "")
         {
             this.TrHeader.Visible = false;
         }
         this.btnSet.Attributes["onclick"] = "if (!openQuery(" + this.reportid + ")){return false;}";
         this.Session["QUERY"]             = null;
         this.DG1_BIND(" where (1=1)");
     }
 }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         this.reportid = base.Request.QueryString["reportid"];
         DataRow reportRow = QueryItemAction.GetReportRow(this.reportid);
         string  text      = base.Request["type"].ToString();
         string  text2     = "";
         string  a;
         if ((a = text) != null)
         {
             if (!(a == "1"))
             {
                 if (!(a == "2"))
                 {
                     if (!(a == "3"))
                     {
                         if (!(a == "4"))
                         {
                             if (a == "5")
                             {
                                 text2 = "其他";
                             }
                         }
                         else
                         {
                             text2 = "租赁";
                         }
                     }
                     else
                     {
                         text2 = "采购";
                     }
                 }
                 else
                 {
                     text2 = "分包";
                 }
             }
             else
             {
                 text2 = "承包";
             }
         }
         this.Lb_Title.Text = text2 + reportRow["Title"].ToString();
         int    n     = Convert.ToInt32(reportRow["headwidth"].ToString());
         string text3 = reportRow["Header"].ToString().Replace("[getdate()]", DateTime.Now.ToLongDateString());
         text3 = text3.Replace("[yhmc]", com.jwsoft.pm.entpm.PageHelper.QueryUser(this, this.Session["yhdm"].ToString()));
         string[] array = text3.Split(new char[]
         {
             ';'
         });
         try
         {
             this.Lb_H1.Text = array[0];
             this.Lb_H2.Text = array[1];
             this.Lb_H3.Text = array[2];
         }
         catch
         {
         }
         string text4 = reportRow["Footer"].ToString().Replace("[getdate()]", DateTime.Now.ToLongDateString());
         text4 = text4.Replace("[yhmc]", com.jwsoft.pm.entpm.PageHelper.QueryUser(this, this.Session["yhdm"].ToString()));
         string[] array2 = text4.Split(new char[]
         {
             ';'
         });
         try
         {
             this.Lb_F1.Text = array2[0];
             this.Lb_F2.Text = array2[1];
             this.Lb_F3.Text = array2[2];
         }
         catch
         {
         }
         if (this.Lb_Title.Text.Trim() == "")
         {
             this.TRTitle.Visible = false;
         }
         this.DG1.Width = n;
         if (this.Lb_F1.Text.Trim() == "" && this.Lb_F2.Text.Trim() == "" && this.Lb_F3.Text.Trim() == "")
         {
             this.TrFooter.Visible = false;
         }
         if (this.Lb_H1.Text.Trim() == "" && this.Lb_H2.Text.Trim() == "" && this.Lb_H3.Text.Trim() == "")
         {
             this.TrHeader.Visible = false;
         }
         this.btnSet.Attributes["onclick"] = "if (!openQuery(" + this.reportid + ")){return false;}";
         string text5 = " where (1=1) ";
         if (text2.Trim() != "")
         {
             text5 = text5 + "  and 合同类型 like '" + text2 + "合同' ";
         }
         this.DG1_BIND(text5);
     }
 }