111
This commit is contained in:
		
							parent
							
								
									d2a7ce4d35
								
							
						
					
					
						commit
						eedac73a48
					
				
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -17,7 +17,9 @@
 | 
			
		|||
                    EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="PipelineCode"
 | 
			
		||||
                    AllowCellEditing="true" ClicksToEdit="2" AllowSorting="true"
 | 
			
		||||
                    SortField="WorkAreaCode,PipelineCode" SortDirection="DESC" OnSort="Grid1_Sort"
 | 
			
		||||
                    AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
 | 
			
		||||
                    AllowPaging="true" IsDatabasePaging="true"
 | 
			
		||||
                    PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
 | 
			
		||||
                     OnRowDataBound="Grid1_RowDataBound"
 | 
			
		||||
                    EnableTextSelection="True">
 | 
			
		||||
                    <Toolbars>
 | 
			
		||||
                        <f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
 | 
			
		||||
| 
						 | 
				
			
			@ -65,13 +67,13 @@
 | 
			
		|||
                        <f:RenderField HeaderText="预制检测数量" ColumnID="PMIBySNum" DataField="PMIBySNum" Width="160"></f:RenderField>
 | 
			
		||||
                        <f:TemplateField HeaderText="预制检测比例" ColumnID="RateBys" Width="160">
 | 
			
		||||
                            <ItemTemplate>
 | 
			
		||||
                                <asp:Label ID="labRateBys" runat="server" Text='<%#Eval("RateBys")+"%" %>'></asp:Label>
 | 
			
		||||
                                <asp:Label ID="labRateBys" runat="server" Text='<%#Eval("RateBys") %>'></asp:Label>
 | 
			
		||||
                            </ItemTemplate>
 | 
			
		||||
                        </f:TemplateField>
 | 
			
		||||
                        <f:RenderField HeaderText="安装检测数量" ColumnID="PMIByFNum" DataField="PMIByFNum" Width="160"></f:RenderField>
 | 
			
		||||
                        <f:TemplateField HeaderText="安装检测比例" ColumnID="RateByf" Width="160">
 | 
			
		||||
                            <ItemTemplate>
 | 
			
		||||
                                <asp:Label ID="Label1" runat="server" Text='<%#Eval("RateByf")+"%" %>'></asp:Label>
 | 
			
		||||
                                <asp:Label ID="labRateByf" runat="server" Text='<%#Eval("RateByf") %>'></asp:Label>
 | 
			
		||||
                            </ItemTemplate>
 | 
			
		||||
                        </f:TemplateField>
 | 
			
		||||
                    </Columns>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,6 +7,8 @@ using System.Linq;
 | 
			
		|||
using System.Web;
 | 
			
		||||
using System.Web.UI;
 | 
			
		||||
using System.Web.UI.WebControls;
 | 
			
		||||
using AspNet = System.Web.UI.WebControls;
 | 
			
		||||
using System.Drawing;
 | 
			
		||||
 | 
			
		||||
namespace FineUIPro.Web.WeldingProcess.PMI
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -25,9 +27,10 @@ namespace FineUIPro.Web.WeldingProcess.PMI
 | 
			
		|||
                this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
 | 
			
		||||
                BLL.Base_UnitService.InitProjectUnitDropDownList(this.drpUnitId, true, this.CurrUser.LoginProjectId, BLL.Const.UnitType_5, Resources.Lan.PleaseSelect);//单位
 | 
			
		||||
                BLL.Project_WorkAreaService.InitWorkAreaDropDownList(this.drpWorkAreaId, true, this.CurrUser.LoginProjectId, string.Empty, this.drpUnitId.SelectedValue, string.Empty, Resources.Lan.PleaseSelect);//区域
 | 
			
		||||
              
 | 
			
		||||
          
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
      
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// 绑定数据
 | 
			
		||||
| 
						 | 
				
			
			@ -86,7 +89,7 @@ namespace FineUIPro.Web.WeldingProcess.PMI
 | 
			
		|||
            }
 | 
			
		||||
            if (this.drpWorkAreaId.SelectedValue != BLL.Const._Null)
 | 
			
		||||
            {
 | 
			
		||||
                sql += " and WorkAreaId=@unitId";
 | 
			
		||||
                sql += " and WorkAreaId=@workAreaId";
 | 
			
		||||
                listStr.Add(new SqlParameter("@workAreaId", this.drpWorkAreaId.SelectedValue));
 | 
			
		||||
            }
 | 
			
		||||
            if (this.drpIsALl.SelectedValue!="全部")
 | 
			
		||||
| 
						 | 
				
			
			@ -95,7 +98,7 @@ namespace FineUIPro.Web.WeldingProcess.PMI
 | 
			
		|||
            }
 | 
			
		||||
            if (!string.IsNullOrEmpty(this.txtPipelineCode.Text))
 | 
			
		||||
            {
 | 
			
		||||
                sql += " and PipelineCode like '%@PipelineCode%'";
 | 
			
		||||
                sql += " and PipelineCode like '%'+@PipelineCode+'%'";
 | 
			
		||||
                listStr.Add(new SqlParameter("@PipelineCode", this.txtPipelineCode.Text.Trim()));
 | 
			
		||||
            }
 | 
			
		||||
            SqlParameter[] parameter = listStr.ToArray();
 | 
			
		||||
| 
						 | 
				
			
			@ -127,7 +130,31 @@ namespace FineUIPro.Web.WeldingProcess.PMI
 | 
			
		|||
            BindGrid();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
     
 | 
			
		||||
        protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
 | 
			
		||||
        {
 | 
			
		||||
            DataRowView row = e.DataItem as DataRowView;
 | 
			
		||||
            decimal rates =Math.Round(Convert.ToDecimal(row["RateBys"]),2);
 | 
			
		||||
            decimal ratef = Math.Round(Convert.ToDecimal(row["RateByf"]), 2);
 | 
			
		||||
            AspNet.Label itemLable = e.Row.FindControl("labRateBys") as AspNet.Label;
 | 
			
		||||
            if (itemLable !=null &&  !string.IsNullOrEmpty(itemLable.Text))
 | 
			
		||||
            {
 | 
			
		||||
                itemLable.Text = rates.ToString() + "%";
 | 
			
		||||
                if (rates <= 2)
 | 
			
		||||
                {
 | 
			
		||||
                    itemLable.ForeColor = Color.Red;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            AspNet.Label labRateByf = e.Row.FindControl("labRateByf") as AspNet.Label;
 | 
			
		||||
            if(labRateByf!=null && !string.IsNullOrEmpty(labRateByf.Text))
 | 
			
		||||
            {
 | 
			
		||||
                labRateByf.Text= ratef.ToString() + "%";
 | 
			
		||||
                if (ratef <= 2)
 | 
			
		||||
                {
 | 
			
		||||
                    labRateByf.ForeColor = Color.Red;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// 排序
 | 
			
		||||
        /// </summary>
 | 
			
		||||
| 
						 | 
				
			
			@ -148,7 +175,10 @@ namespace FineUIPro.Web.WeldingProcess.PMI
 | 
			
		|||
        protected void BtnAnalyse_Click(object sender, EventArgs e)
 | 
			
		||||
        {
 | 
			
		||||
            BindGrid();
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        #endregion
 | 
			
		||||
 | 
			
		||||
        #region 下拉选择事件
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -150,13 +150,13 @@ namespace FineUIPro.Web.WeldingProcess.PMI
 | 
			
		|||
        protected global::System.Web.UI.WebControls.Label labRateBys;
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Label1 控件。
 | 
			
		||||
        /// labRateByf 控件。
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <remarks>
 | 
			
		||||
        /// 自动生成的字段。
 | 
			
		||||
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
			
		||||
        /// </remarks>
 | 
			
		||||
        protected global::System.Web.UI.WebControls.Label Label1;
 | 
			
		||||
        protected global::System.Web.UI.WebControls.Label labRateByf;
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// ToolbarSeparator1 控件。
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue