提交代码
This commit is contained in:
@@ -6,10 +6,25 @@
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>开车保运管理</title>
|
||||
<style type="text/css">
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.f-grid-row.yellow {
|
||||
background-color: yellow;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.f-grid-row.red {
|
||||
background-color: red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1"/>
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="HBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
@@ -21,6 +36,8 @@
|
||||
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnitId" runat="server" Label="单位名称" LabelAlign="Right" LabelWidth="130px" Width="400px"></f:DropDownList>
|
||||
<f:DropDownList ID="drpStatus" runat="server" Label="实施状态" LabelAlign="Right" LabelWidth="100px"></f:DropDownList>
|
||||
<f:DropDownList ID="drpPriority" runat="server" Label="优先级" LabelAlign="Right" LabelWidth="100px"></f:DropDownList>
|
||||
<f:Button ID="btnSearch" Icon="SystemSearch" ToolTip="搜索"
|
||||
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
|
||||
</f:Button>
|
||||
@@ -44,7 +61,7 @@
|
||||
FieldType="String" HeaderText="内容" HeaderTextAlign="Center" Width="300px" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Objective" DataField="Objective"
|
||||
FieldType="String" HeaderText="目的" HeaderTextAlign="Center" Width="200px" >
|
||||
FieldType="String" HeaderText="目的" HeaderTextAlign="Center" Width="200px">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="NeedCompletedDate" DataField="NeedCompletedDate"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="需完成时间" TextAlign="Center" HeaderTextAlign="Center">
|
||||
@@ -52,6 +69,12 @@
|
||||
<f:RenderField Width="120px" ColumnID="RealCompletedDate" DataField="RealCompletedDate"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="实际完成时间" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Status" DataField="Status"
|
||||
FieldType="String" HeaderText="实施状态" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Priority" DataField="Priority"
|
||||
FieldType="String" HeaderText="优先级" HeaderTextAlign="Center" Width="80px">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="State" Width="150px" HeaderText="审批状态" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
@@ -88,7 +111,7 @@
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="开车保运管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="900px" Height="620px">
|
||||
Width="900px" Height="650px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
|
||||
@@ -18,6 +18,24 @@ namespace FineUIPro.Web.TestRun.DriverRun
|
||||
BindGrid();
|
||||
btnNew.OnClientClick = Window1.GetShowReference("DriverRunEdit.aspx") + "return false;";
|
||||
BLL.UnitService.InitUnitDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
|
||||
ListItem[] list1 = new ListItem[3];
|
||||
list1[0] = new ListItem("未开始", "1");
|
||||
list1[1] = new ListItem("进行中", "2");
|
||||
list1[2] = new ListItem("已完成", "3");
|
||||
this.drpStatus.DataTextField = "Text";
|
||||
this.drpStatus.DataValueField = "Value";
|
||||
this.drpStatus.DataSource = list1;
|
||||
this.drpStatus.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpStatus);
|
||||
ListItem[] list2 = new ListItem[3];
|
||||
list2[0] = new ListItem("低", "1");
|
||||
list2[1] = new ListItem("中", "2");
|
||||
list2[2] = new ListItem("高", "3");
|
||||
this.drpPriority.DataTextField = "Text";
|
||||
this.drpPriority.DataValueField = "Value";
|
||||
this.drpPriority.DataSource = list2;
|
||||
this.drpPriority.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpPriority);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -39,6 +57,8 @@ namespace FineUIPro.Web.TestRun.DriverRun
|
||||
driverRun.Objective,
|
||||
driverRun.NeedCompletedDate,
|
||||
driverRun.RealCompletedDate,
|
||||
case driverRun.Status when '1' then '未开始' when '2' then '进行中' when '3' then '已完成' else '' end as Status,
|
||||
case driverRun.Priority when '1' then '低' when '2' then '中' when '3' then '高' else '' end as Priority,
|
||||
driverRun.Remark,
|
||||
Unit.UnitName AS UnitName"
|
||||
+ @" FROM DriverRun_DriverRun AS driverRun"
|
||||
@@ -50,6 +70,16 @@ namespace FineUIPro.Web.TestRun.DriverRun
|
||||
strSql += " AND driverRun.UnitId=@unitId";
|
||||
listStr.Add(new SqlParameter("@unitId", this.drpUnitId.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.drpStatus.SelectedValue) && this.drpStatus.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND driverRun.Status=@Status";
|
||||
listStr.Add(new SqlParameter("@Status", this.drpStatus.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.drpPriority.SelectedValue) && this.drpPriority.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND driverRun.Priority=@Priority";
|
||||
listStr.Add(new SqlParameter("@Priority", this.drpPriority.SelectedValue));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
@@ -57,6 +87,21 @@ namespace FineUIPro.Web.TestRun.DriverRun
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
Model.DriverRun_DriverRun driverRun = BLL.DriverRunService.GetDriverRunById(Grid1.Rows[i].DataKeys[0].ToString());
|
||||
if (driverRun != null)
|
||||
{
|
||||
if (driverRun.Priority == "2")
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "yellow";
|
||||
}
|
||||
else if (driverRun.Priority == "3")
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "red";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -66,6 +66,24 @@ namespace FineUIPro.Web.TestRun.DriverRun {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitId;
|
||||
|
||||
/// <summary>
|
||||
/// drpStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpStatus;
|
||||
|
||||
/// <summary>
|
||||
/// drpPriority 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPriority;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -64,6 +64,12 @@
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpStatus" runat="server" Label="实施状态" LabelAlign="Right" LabelWidth="150px" Required="true" ShowRedStar="true"></f:DropDownList>
|
||||
<f:DropDownList ID="drpPriority" runat="server" Label="优先级" LabelAlign="Right" LabelWidth="150px" Required="true" ShowRedStar="true"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="txtNeedCompletedDate" ShowRedStar="true" runat="server" Label="需完成时间" LabelWidth="150px" Required="true" LabelAlign="Right"
|
||||
|
||||
@@ -31,6 +31,24 @@ namespace FineUIPro.Web.TestRun.DriverRun
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BLL.UnitService.InitUnitDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
|
||||
ListItem[] list1 = new ListItem[3];
|
||||
list1[0]= new ListItem("未开始","1");
|
||||
list1[1] = new ListItem("进行中", "2");
|
||||
list1[2] = new ListItem("已完成", "3");
|
||||
this.drpStatus.DataTextField = "Text";
|
||||
this.drpStatus.DataValueField = "Value";
|
||||
this.drpStatus.DataSource = list1;
|
||||
this.drpStatus.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpStatus);
|
||||
ListItem[] list2 = new ListItem[3];
|
||||
list2[0] = new ListItem("低", "1");
|
||||
list2[1] = new ListItem("中", "2");
|
||||
list2[2] = new ListItem("高", "3");
|
||||
this.drpPriority.DataTextField = "Text";
|
||||
this.drpPriority.DataValueField = "Value";
|
||||
this.drpPriority.DataSource = list2;
|
||||
this.drpPriority.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpPriority);
|
||||
BLL.UnitWorkService.InitUnitWorkDropDownList(this.drpUnitWorkIds, this.CurrUser.LoginProjectId, true);
|
||||
plApprove1.Hidden = true;
|
||||
plApprove2.Hidden = true;
|
||||
@@ -63,6 +81,14 @@ namespace FineUIPro.Web.TestRun.DriverRun
|
||||
{
|
||||
this.txtRealCompletedDate.Text = string.Format("{0:yyyy-MM-dd}", data.RealCompletedDate);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(data.Status))
|
||||
{
|
||||
this.drpStatus.SelectedValue = data.Status;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(data.Priority))
|
||||
{
|
||||
this.drpPriority.SelectedValue = data.Priority;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(data.State))
|
||||
{
|
||||
State = data.State;
|
||||
@@ -167,6 +193,16 @@ namespace FineUIPro.Web.TestRun.DriverRun
|
||||
Alert.ShowInTop("请选择区域!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpStatus.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择实施状态!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpPriority.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择优先级!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (State == BLL.Const.DriverRun_Audit4 && string.IsNullOrEmpty(this.txtRealCompletedDate.Text.Trim()))
|
||||
{
|
||||
Alert.ShowInTop("请选择实际完成时间!", MessageBoxIcon.Warning);
|
||||
@@ -189,6 +225,16 @@ namespace FineUIPro.Web.TestRun.DriverRun
|
||||
Alert.ShowInTop("请选择区域!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpStatus.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择实施状态!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpPriority.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择优先级!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (State == BLL.Const.DriverRun_Audit4 && string.IsNullOrEmpty(this.txtRealCompletedDate.Text.Trim()))
|
||||
{
|
||||
Alert.ShowInTop("请选择实际完成时间!", MessageBoxIcon.Warning);
|
||||
@@ -227,6 +273,14 @@ namespace FineUIPro.Web.TestRun.DriverRun
|
||||
}
|
||||
newData.Descriptions = this.txtDescriptions.Text.Trim();
|
||||
newData.Objective = this.txtObjective.Text.Trim();
|
||||
if (this.drpStatus.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newData.Status = this.drpStatus.SelectedValue;
|
||||
}
|
||||
if (this.drpPriority.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newData.Priority = this.drpPriority.SelectedValue;
|
||||
}
|
||||
newData.NeedCompletedDate = Funs.GetNewDateTime(this.txtNeedCompletedDate.Text.Trim());
|
||||
newData.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newData.RealCompletedDate = Funs.GetNewDateTime(this.txtRealCompletedDate.Text.Trim());
|
||||
|
||||
@@ -156,6 +156,24 @@ namespace FineUIPro.Web.TestRun.DriverRun {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtObjective;
|
||||
|
||||
/// <summary>
|
||||
/// drpStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpStatus;
|
||||
|
||||
/// <summary>
|
||||
/// drpPriority 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPriority;
|
||||
|
||||
/// <summary>
|
||||
/// txtNeedCompletedDate 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -60,6 +60,12 @@
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpStatus" runat="server" Label="实施状态" LabelAlign="Right" LabelWidth="150px" Required="true" ShowRedStar="true" Readonly="true"></f:DropDownList>
|
||||
<f:DropDownList ID="drpPriority" runat="server" Label="优先级" LabelAlign="Right" LabelWidth="150px" Required="true" ShowRedStar="true" Readonly="true"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="txtNeedCompletedDate" ShowRedStar="true" runat="server" Label="需完成时间" Readonly="true" LabelWidth="150px" Required="true" LabelAlign="Right"
|
||||
|
||||
@@ -31,6 +31,24 @@ namespace FineUIPro.Web.TestRun.DriverRun
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BLL.UnitService.InitUnitDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
|
||||
ListItem[] list1 = new ListItem[3];
|
||||
list1[0] = new ListItem("未开始", "1");
|
||||
list1[1] = new ListItem("进行中", "2");
|
||||
list1[2] = new ListItem("已完成", "3");
|
||||
this.drpStatus.DataTextField = "Text";
|
||||
this.drpStatus.DataValueField = "Value";
|
||||
this.drpStatus.DataSource = list1;
|
||||
this.drpStatus.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpStatus);
|
||||
ListItem[] list2 = new ListItem[3];
|
||||
list2[0] = new ListItem("低", "1");
|
||||
list2[1] = new ListItem("中", "2");
|
||||
list2[2] = new ListItem("高", "3");
|
||||
this.drpPriority.DataTextField = "Text";
|
||||
this.drpPriority.DataValueField = "Value";
|
||||
this.drpPriority.DataSource = list2;
|
||||
this.drpPriority.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpPriority);
|
||||
BLL.UnitWorkService.InitUnitWorkDropDownList(this.drpUnitWorkIds, this.CurrUser.LoginProjectId, true);
|
||||
string id = Request.Params["id"];
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
@@ -58,6 +76,14 @@ namespace FineUIPro.Web.TestRun.DriverRun
|
||||
{
|
||||
this.txtRealCompletedDate.Text = string.Format("{0:yyyy-MM-dd}", data.RealCompletedDate);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(data.Status))
|
||||
{
|
||||
this.drpStatus.SelectedValue = data.Status;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(data.Priority))
|
||||
{
|
||||
this.drpPriority.SelectedValue = data.Priority;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(data.State))
|
||||
{
|
||||
State = data.State;
|
||||
|
||||
@@ -138,6 +138,24 @@ namespace FineUIPro.Web.TestRun.DriverRun {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtObjective;
|
||||
|
||||
/// <summary>
|
||||
/// drpStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpStatus;
|
||||
|
||||
/// <summary>
|
||||
/// drpPriority 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPriority;
|
||||
|
||||
/// <summary>
|
||||
/// txtNeedCompletedDate 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user