Beispiel #1
0
        public void UserDateBind()
        {
            CommonDao<HealthUserOrder> HealthUserOrdermgr = new CommonDao<HealthUserOrder>();
            CommonDao<HealthAdmin> healadminmgr = new CommonDao<HealthAdmin>();
            string username = UI.GetList("CN_ID = " + userid).Tables[0].Rows[0]["CN_LOGIN"].ToString();
            if (int.Parse(healadminmgr.GetTotalCount(" username='******' and works=2 ")) > 0)
            {
                string condition = " userid in('other','" + userid + "') ";
                if (this.DropDownList1.Text.Trim() != "")
                {
                    condition = condition + " and  userstate='" + this.DropDownList1.Text.ToString() + "'";
                }
                AspNetPager1.RecordCount = int.Parse(HealthUserOrdermgr.GetTotalCount(condition));
                Repeater1.DataSource = HealthUserOrdermgr.FindAllByPageDesc(((AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize).ToString(), AspNetPager1.PageSize.ToString(), condition);
                Repeater1.DataBind();

            }
            else
            {

                string condition = " username='******'";
                if (this.DropDownList1.Text.Trim() != "")
                {
                    condition = condition + " and  userstate='" + this.DropDownList1.Text.ToString() + "'";
                }
                AspNetPager1.RecordCount = int.Parse(HealthUserOrdermgr.GetTotalCount(condition));
                Repeater1.DataSource = HealthUserOrdermgr.FindAllByPageDesc(((AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize).ToString(), AspNetPager1.PageSize.ToString(), condition);
                Repeater1.DataBind();
            }




        }
Beispiel #2
0
  public void UserDateBind()
  {
      CommonDao<HealthUserOrder> HealthUserOrdermgr = new CommonDao<HealthUserOrder>();
      CommonDao<HealthAdmin> healadminmgr = new CommonDao<HealthAdmin>();
          string condition = " 1=1 ";
          if (this.TextBox1.Text.Trim() != "") {
              condition = condition + " and  USERNAME like '%" + this.TextBox1.Text.ToString() + "%'";
          }
          if (this.TextBox2.Text.Trim() != "")
          {
              condition = condition + " and  STARTTIME >'" + this.TextBox2.Text.ToString() + "'";
          }
          if (this.TextBox3.Text.Trim() != "")
          {
              condition = condition + " and  STARTTIME <'" + this.TextBox3.Text.ToString() + "'";
          }
          if (this.DropDownList2.Text.Trim() != "")
          {
              condition = condition + " and  USERDOCTOR ='" + this.DropDownList2.Text.ToString() + "'";
          }
 
          if (this.DropDownList1.Text.Trim() != "")
          {
              condition = condition + " and  userstate='" + this.DropDownList1.Text.ToString() + "'";
          }
          AspNetPager1.RecordCount = int.Parse(HealthUserOrdermgr.GetTotalCount(condition));
          Repeater1.DataSource = HealthUserOrdermgr.FindAllByPageDesc(((AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize).ToString(), AspNetPager1.PageSize.ToString(), condition);
          Repeater1.DataBind();
      
  }
Beispiel #3
0
        private void GetZhuanTiList()
        {
            string fid = "";
            string condition = "";
            if (Request["ZhuanName"] != null)
            {
                fid = Request["ZhuanName"].ToString();
                CommonDao<Safezhuan> sugmgr = new CommonDao<Safezhuan>();
                Safezhuan safezhuan = sugmgr.FindByConditions(" fid='"+fid+"' ");

                this.lableType.InnerHtml = " <span style='color: #0087ce;'>" +safezhuan.ZhuanName.ToString() + "</span>";
                condition = condition +  " NewsZhuan ='" + fid + "' ";
            }

            CommonDao<SafeNews> newmgr = new CommonDao<SafeNews>();
            SafeNews s = new SafeNews();
          

            if (TextBoxSearch.Text.Trim().Length > 0)
            {
                condition = condition + " and  newstitle like '%" + this.TextBoxSearch.Text.Trim().ToString() + "%'";
            }

            Pager.RecordCount = int.Parse(newmgr.GetTotalCount(condition));
            RepeaterPubGG.DataSource = newmgr.FindAllByPageDesc(((Pager.CurrentPageIndex - 1) * Pager.PageSize).ToString(), Pager.PageSize.ToString(), condition);
            RepeaterPubGG.DataBind();

        }
Beispiel #4
0
        private void InfoBind()
        {
            string Infotype = Request.QueryString["Infotype"];
            string type = Request.QueryString["type"];
            if (Infotype == null && type == null)
            {
                Infotype = "安全新闻";
            }

            string condition = "";
            CommonDao<SafeNews> newmgr = new CommonDao<SafeNews>();
            if (Infotype == "安全新闻")
            {
                condition = " NewsInfoType = '" + Infotype + "' ";
            }
            else
            {
                condition = " NewsInfoType = '" + Infotype + "' and NewsType='" + type + "' ";
            }


            if (TextBoxSearch.Text.Trim().Length > 0)
            {
                condition = condition + " and  newstitle like '%" + this.TextBoxSearch.Text.Trim().ToString() + "%'";
            }

            Pager.RecordCount = int.Parse(newmgr.GetTotalCount(condition));
            RepeaterPubGG.DataSource = newmgr.FindAllByPageDesc(((Pager.CurrentPageIndex - 1) * Pager.PageSize).ToString(), Pager.PageSize.ToString(), condition);
            RepeaterPubGG.DataBind();
        }
Beispiel #5
0
        private void InfoBind()
        {

            CommonDao<SafePitFalls> newmgr = new CommonDao<SafePitFalls>();
            string condition = " 1=1  ";

            if (TextBoxyh.Text.Trim().Length > 0)
            {
                condition = condition + " and  PitContents like '%" + this.TextBoxyh.Text.Trim().ToString() + "%'";
            } 
                if (TextBoxdept.Text.Trim().Length > 0)
            {
                condition = condition + " and dept like '%" + this.TextBoxdept.Text.Trim().ToString() + "%'";
            }
              
            if (TextBoxperson.Text.Trim().Length > 0)
            {
                condition = condition + " and person like '%" + this.TextBoxperson.Text.Trim().ToString() + "%'";
            }
             
            if (TextBoxqy.Text.Trim().Length > 0)
            {
                condition = condition + " and Area like '%" + this.TextBoxqy.Text.Trim().ToString() + "%'";
            }
             
            if (TextBoxtime.Text.Trim().Length > 0)
            {
                condition = condition + " and time = '" + this.TextBoxtime.Text.Trim().ToString()+"'";
            }

            Pager.RecordCount = int.Parse(newmgr.GetTotalCount(condition));
            RepeaterPubGG.DataSource = newmgr.FindAllByPageDesc(((Pager.CurrentPageIndex - 1) * Pager.PageSize).ToString(), Pager.PageSize.ToString(), condition);
            RepeaterPubGG.DataBind();
        }
Beispiel #6
0
        private void InfoBind()
        {
            CommonDao<SafeRewards> newmgr = new CommonDao<SafeRewards>();
            string condition = " ";

            if (TextBoxSearch.Text.Trim().Length > 0)
            {
                condition = condition + " Area like '%" + this.TextBoxSearch.Text.Trim().ToString() + "%'";
            }

            Pager.RecordCount = int.Parse(newmgr.GetTotalCount(condition));
            RepeaterPubGG.DataSource = newmgr.FindAllByPageDesc(((Pager.CurrentPageIndex - 1) * Pager.PageSize).ToString(), Pager.PageSize.ToString(), condition);
            RepeaterPubGG.DataBind();
        }
Beispiel #7
0
        private void InfoBind()
        {


            CommonDao<SafeNews> newmgr = new CommonDao<SafeNews>();
            string condition = " NewsInfoType = '安全新闻' ";
            if (TextBoxSearch.Text.Trim().Length > 0)
            {
                condition = condition + " and  newstitle like '%" + this.TextBoxSearch.Text.Trim().ToString() + "%'";
            }

            Pager.RecordCount = int.Parse(newmgr.GetTotalCount(condition));
            RpNewReplay.DataSource = newmgr.FindAllByPageDesc(((Pager.CurrentPageIndex - 1) * Pager.PageSize).ToString(), Pager.PageSize.ToString(), condition);
            RpNewReplay.DataBind();
        }
Beispiel #8
0
        private void InfoBind(string dept)
        {

            CommonDao<SafePitFalls> newmgr = new CommonDao<SafePitFalls>();
            string condition = " datediff (month,time,getdate())=0   ";

            if (dept.Length > 0)
            {
                condition = condition + " and  dept like '%" + dept + "%'";
            }


            Pager.RecordCount = int.Parse(newmgr.GetTotalCount(condition));
            Repeateryhxx.DataSource = newmgr.FindAllByPageDesc(((Pager.CurrentPageIndex - 1) * Pager.PageSize).ToString(), Pager.PageSize.ToString(), condition);
            Repeateryhxx.DataBind();
        }
Beispiel #9
0
        private void InfoBind()
        {
            string type = "安全公文";
            if (Request["type"] != null)
            {
                type = Request["type"].ToString(); 
                this.lableType.InnerHtml = " <span style='color: #0087ce;'>" + type + "</span>";
            }


            CommonDao<SafeNews> newmgr = new CommonDao<SafeNews>();
            string condition = " NewsInfoType = '安全信息' and  newstype ='" + type + "' ";

            if (TextBoxSearch.Text.Trim().Length > 0)
            {
                condition = condition + " and  newstitle like '%" + this.TextBoxSearch.Text.Trim().ToString() + "%'";
            }

            Pager.RecordCount = int.Parse(newmgr.GetTotalCount(condition));
            RepeaterPubGG.DataSource = newmgr.FindAllByPageDesc(((Pager.CurrentPageIndex - 1) * Pager.PageSize).ToString(), Pager.PageSize.ToString(), condition);
            RepeaterPubGG.DataBind();
        }
Beispiel #10
0
        public void UserDateBind()
        {
            CommonDao<V_HealthScoreHistory> HealthUserScoremgr = new CommonDao<V_HealthScoreHistory>();
            string condition = " 1=1 ";
            if (this.TextBox1.Text.Trim() != "")
            {
                condition = condition + " and  USERNAME like '%" + this.TextBox1.Text.ToString() + "%'";
            }
            if (this.TextBox2.Text.Trim() != "")
            {
                condition = condition + " and  STARTTIME >'" + this.TextBox2.Text.ToString() + "'";
            }
            if (this.TextBox3.Text.Trim() != "")
            {
                condition = condition + " and  STARTTIME <'" + this.TextBox3.Text.ToString() + "'";
            }
            if (this.DropDownList2.Text.Trim() != "")
            {
                condition = condition + " and  USERDOCTOR ='" + this.DropDownList2.Text.ToString() + "'";
            }
            if (this.TextBox4.Text.Trim() != "")
            {
                string value = this.TextBox4.Text.ToString();
                condition = condition + " and  ( LIDAO <" + value + " or SHUSHIDU  <" + value + " or  LIAOXIAO  <" + value + " or  JIFA <" + value + "  or  FUWUTAIDU   <" + value + ")";

            }

            if (this.TextBox5.Text.Trim() != "")
            {
                string value = this.TextBox5.Text.ToString();
                condition = condition + " and  ( TOTALSUM < " + value + ")";

            }

            //if (this.DropDownList1.Text.Trim() != "")
            //{
            //    condition = condition + " and  userstate='" + this.DropDownList1.Text.ToString() + "'";
            //}
            AspNetPager1.RecordCount = int.Parse(HealthUserScoremgr.GetTotalCount(condition));
            Repeater1.DataSource = HealthUserScoremgr.FindAllByPageDesc(((AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize).ToString(), AspNetPager1.PageSize.ToString(), condition);
            Repeater1.DataBind();

        }
Beispiel #11
0
        private void InfoBind()
        {
            CommonDao<SafePitFalls> newmgr = new CommonDao<SafePitFalls>();
            string condition = " ";
            if (ViewState["con"] == null)
            {
                condition = condition = "1!=1";
            }
            else
            {
                string allornot = "";
                if (ViewState["fulldept"].ToString().Substring(0, 3) == "999")
                {
                    allornot = "已处理";
                }
                else
                {
                    allornot = "全部";
                }

                condition = condition + ViewState["con"];
                lbusername.Text = "您正在查看的是   " + ViewState["dept"].ToString() + "  " + allornot + "的安全隐患 ";
            }

            Pager.RecordCount = int.Parse(newmgr.GetTotalCount(condition));
            RepeaterPubGG.DataSource = newmgr.FindAllByPageDesc(((Pager.CurrentPageIndex - 1) * Pager.PageSize).ToString(), Pager.PageSize.ToString(), condition);
            RepeaterPubGG.DataBind();
        }