コード例 #1
0
 void QueryPolicy(Pagination pagination)
 {
     try
     {
         var querylist = PolicyManageService.GetSuspendOperation(GetCondition(), pagination);
         var list      = from item in querylist
                         select new
         {
             OptionTime      = item.OperateTime,
             Option          = item.CompanyId == Guid.Parse("00000000-0000-0000-0000-000000000001") ? item.CompanyName + "(" + item.Operator + ")" : "<a href='/OrganizationModule/TerraceModule/CompanyInfoManage/LookUpCompanyInfo.aspx?CompanyId=" + item.CompanyId + "'>" + item.CompanyName + "(" + item.Operator + ")" + " </a>",
             OptionOwnerType = item.OperatorRoleType.GetDescription(),
             OptionType      = item.OperateType.GetDescription(),
             OptionContent   = item.OperateType.GetDescription() + ":" + item.Airlines,
             OptionReason    = item.Reason,
             IP          = item.IP,
             companyid   = item.CompanyId,
             companyName = item.CompanyName
         };
         grvlog.DataSource = list;
         grvlog.DataBind();
         if (pagination.RowCount > 0)
         {
             this.pager.Visible = true;
             if (pagination.GetRowCount)
             {
                 this.pager.RowCount = pagination.RowCount;
             }
             showempty.Visible             = false;
             grvlog.HeaderRow.TableSection = TableRowSection.TableHeader;
         }
         else
         {
             showempty.Visible  = true;
             this.pager.Visible = false;
         }
     }
     catch (Exception ex)
     {
         ShowExceptionMessage(ex, "查询");
     }
 }