2024-02-19 试车分包管理修改

This commit is contained in:
2024-02-19 10:32:15 +08:00
parent 4d854a854a
commit 1180cda1a6
26 changed files with 1203 additions and 1290 deletions
@@ -16,7 +16,7 @@
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="开车分包计划" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="DriverSubPlanId" AllowCellEditing="true" ClicksToEdit="2" DataIDField="DriverSubPlanId" AllowSorting="true" SortField="Code"
SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" EnableTextSelection="True" OnRowCommand="Grid1_RowCommand" OnRowDoubleClick="Grid1_RowDoubleClick" ForceFit="True" >
EnableRowDoubleClickEvent="true" EnableTextSelection="True" OnRowCommand="Grid1_RowCommand" ForceFit="True" >
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
@@ -27,6 +27,9 @@
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnNew" Icon="Add" ToolTip="新增" EnablePostBack="false" runat="server" Hidden="true">
</f:Button>
<f:Button ID="btnSelect" Icon="ApplicationEdit" ToolTip="选标" Text="选标" EnablePostBack="True" runat="server" OnClick="btnSelect_OnClick"> </f:Button>
<f:Button ID="btnScoring" Icon="ApplicationEdit" ToolTip="打分" Text="打分" EnablePostBack="True" runat="server" OnClick="btnScoring_OnClick"> </f:Button>
</Items>
</f:Toolbar>
</Toolbars>
@@ -36,7 +39,7 @@
</f:RenderField>
<f:TemplateField HeaderText="开车分包类别" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# GetDriverSubName(Eval("DriverSubNames")) %>'></asp:Label>
<asp:Label ID="Label1" runat="server" Text='<%# BLL.DriverSubPlanService.GetSubcontractingTypeNames(Eval("SubcontractingTypes")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<%-- <f:LinkButtonField HeaderText="附件" ConfirmTarget="Top" CommandName="AttachUrl" ColumnID="AttachUrl"
@@ -43,34 +43,13 @@ namespace FineUIPro.Web.TestRun.DriverSub
x.InstallationNames,
x.AttachUrl,
x.Remark,
x.DriverSubNames,
x.SubcontractingTypes,
};
table = table.Skip(Grid1.PageSize * Grid1.PageIndex).Take(Grid1.PageSize);
Grid1.DataSource = table;
Grid1.DataBind();
}
public string GetDriverSubName(object str)
{
string strName = "";
if (str != null)
{
string[] strArr = str.ToString().Split(',');
foreach (string s in strArr)
{
foreach (System.Web.UI.WebControls.ListItem item in DropListService.drpDriverSubNameList())
{
if (item.Value == s)
{
strName += item.Text + ",";
}
}
}
}
return strName.TrimEnd(',');
}
#endregion
#region
@@ -220,5 +199,32 @@ namespace FineUIPro.Web.TestRun.DriverSub
}
}
#endregion
protected void btnSelect_OnClick(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DriverSubSetContactorEdit.aspx?DriverSubPlanId={0}", Grid1.SelectedRowID, "编辑 - ")));
}
protected void btnScoring_OnClick(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
if (!DriverSubContactService.IsAllBidirectional(Grid1.SelectedRowID))
{
Alert.ShowInTop("请先进行选标确定中标单位!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DriverSubEdit.aspx?DriverSubPlanId={0}", Grid1.SelectedRowID, "编辑 - ")));
}
}
}
@@ -86,6 +86,24 @@ namespace FineUIPro.Web.TestRun.DriverSub
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// btnSelect 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSelect;
/// <summary>
/// btnScoring 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnScoring;
/// <summary>
/// Label1 控件。
/// </summary>
@@ -35,7 +35,7 @@
</f:RenderField>
<f:TemplateField HeaderText="开车分包类别" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# GetDriverSubName(Eval("DriverSubNames")) %>'></asp:Label>
<asp:Label ID="Label1" runat="server" Text='<%# BLL.DriverSubPlanService.GetSubcontractingTypeNames(Eval("SubcontractingTypes")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
</Columns>
@@ -44,33 +44,12 @@ namespace FineUIPro.Web.TestRun.DriverSub
x.InstallationNames,
x.AttachUrl,
x.Remark,
x.DriverSubNames,
x.SubcontractingTypes,
};
table = table.Skip(Grid1.PageSize * Grid1.PageIndex).Take(Grid1.PageSize);
Grid1.DataSource = table;
Grid1.DataBind();
}
public string GetDriverSubName(object str)
{
string strName = "";
if (str != null)
{
string[] strArr = str.ToString().Split(',');
foreach (string s in strArr)
{
foreach (System.Web.UI.WebControls.ListItem item in DropListService.drpDriverSubNameList())
{
if (item.Value == s)
{
strName += item.Text + ",";
}
}
}
}
return strName.TrimEnd(',');
}
#endregion
#region
@@ -211,7 +211,7 @@ namespace FineUIPro.Web.TestRun.DriverSub
BindGrid(Grid2, "2", drpSubPlanCode.SelectedValue, ttbSearch2.Text);
BindGrid(Grid3, "3", drpSubPlanCode.SelectedValue, ttbSearch3.Text);
BindGrid(Grid4, "4", drpSubPlanCode.SelectedValue, ttbSearch4.Text);
this.DriverSubName.SelectedValueArray = model.DriverSubNames.Split(',');
this.DriverSubName.SelectedValueArray = model.SubcontractingTypes.Split(',');
foreach (string item in DriverSubName.SelectedValueArray)
@@ -27,7 +27,7 @@
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="焊接任务单"
TitleToolTip="焊接任务单" AutoScroll="true">
TitleToolTip="履约情况评价表" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" CssClass="blockpanel" ShowBorder="true" ShowHeader="false" Title="" EnableCollapse="false"
runat="server" DataKeyNames="Number" AllowCellEditing="true" ClicksToEdit="1" ForceFit="true"
@@ -58,7 +58,7 @@ namespace FineUIPro.Web.TestRun.DriverSub
var subPlanModel= DriverSubPlanService.GetDriverSubPlanById(DriverSubPlanId);
if (subPlanModel != null)
{
foreach (var item in subPlanModel.DriverSubNames.Split(','))
foreach (var item in subPlanModel.SubcontractingTypes.Split(','))
{
var name = DropListService.drpDriverSubNameList().Where(x => x.Value == item) .First().Text;
FineUIPro.TreeNode node = new FineUIPro.TreeNode();
@@ -75,14 +75,14 @@ namespace FineUIPro.Web.TestRun.DriverSub
void BindNode(TreeNode node,string type )
{
var SubContractorsList= DriverSubContactService.GetDriverSubContactByDriverSubPlanId(DriverSubPlanId)
.Where(x => x.SubcontractingType == type).Select(x => x.DriverSubContractorsId).ToArray();
.Where(x => x.SubcontractingType == type && x.IsBidirectional==true).Select(x => x.DriverSubContractorsId).ToArray();
foreach (var item in SubContractorsList)
{
string unitName= BLL.DriversubcontractorsService.GetDriverSub_DriverSubContractorsById(item).SubUnitName;
FineUIPro.TreeNode node1 = new FineUIPro.TreeNode();
node1.NodeID = item;
node1.Text = unitName;
node1.CommandName = node1.Text;
node1.CommandName = type;
node1.EnableClickEvent=true;
node.Nodes.Add(node1);
}
@@ -106,7 +106,7 @@ namespace FineUIPro.Web.TestRun.DriverSub
}
else
{
Grid1.DataSource = BLL.DriverSubService.GetDriverSubEvaluationData();
Grid1.DataSource = BLL.DriverSubService.GetDriverSubEvaluationData(tvControlItem.SelectedNode.CommandName);
Grid1.DataBind();
}
@@ -36,9 +36,12 @@
</f:RenderField>
<f:TemplateField HeaderText="开车分包类别" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# GetDriverSubName(Eval("DriverSubNames")) %>'></asp:Label>
<asp:Label ID="Label1" runat="server" Text='<%# BLL.DriverSubPlanService.GetSubcontractingTypeNames(Eval("SubcontractingTypes")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField ColumnID="StateName" DataField="StateName"
FieldType="String" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center" Width="55px">
</f:RenderField>
<f:LinkButtonField HeaderText="附件" ConfirmTarget="Top" CommandName="AttachUrl" ColumnID="AttachUrl"
TextAlign="Center" ToolTip="附件查看" Icon="Find" />
@@ -26,63 +26,13 @@ namespace FineUIPro.Web.TestRun.DriverSub
//加载列表
public void BindGrid()
{
//string strSql = @"SELECT subPlan.DriverSubPlanId,
// subPlan.ProjectId,
// subPlan.Code,
// subPlan.SubUnitId,
// subPlan.Introductions,
// subPlan.Achievement,
// subPlan.Cooperation,
// subPlan.InstallationIds,
// subPlan.InstallationNames,
// (CASE WHEN subPlan.IsInvited=1 THEN '是' ELSE '否' END) AS IsInvitedName,
// subPlan.AttachUrl,
// subPlan.Remark,
// Unit.UnitName AS SubUnitName"
// + @" FROM DriverSub_DriverSubPlan AS subPlan"
// + @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = subPlan.SubUnitId WHERE subPlan.ProjectId=@projectId";
//List<SqlParameter> listStr = new List<SqlParameter>();
//listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
//if (!string.IsNullOrEmpty(this.drpSubUnitId.SelectedValue)&&this.drpSubUnitId.SelectedValue!=BLL.Const._Null)
//{
// strSql += " AND subPlan.SubUnitId=@subUnitId";
// listStr.Add(new SqlParameter("@subUnitId", this.drpSubUnitId.SelectedValue));
//}
//SqlParameter[] parameter = listStr.ToArray();
//DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
//Grid1.RecordCount = tb.Rows.Count;
////tb = GetFilteredTable(Grid1.FilteredData, tb);
//var table = this.GetPagedDataTable(Grid1, tb);
//Grid1.DataSource = table;
//Grid1.DataBind();
Model.DriverSub_DriverSubPlan querymodel = new Model.DriverSub_DriverSubPlan();
querymodel.ProjectId = this.CurrUser.LoginProjectId;
Grid1.DataSource = DriverSubPlanService.GetListData(querymodel, Grid1);
Grid1.DataBind();
}
public string GetDriverSubName(object str)
{
string strName = "";
if (str != null)
{
string[] strArr = str.ToString().Split(',');
foreach (string s in strArr)
{
foreach (System.Web.UI.WebControls.ListItem item in DropListService.drpDriverSubNameList())
{
if (item.Value == s)
{
strName += item.Text + ",";
}
}
}
}
return strName.TrimEnd(',');
}
#endregion
#region
@@ -40,51 +40,14 @@
</f:TextBox>
</Items>
</f:FormRow>
<%-- <f:FormRow>
<Items>
<f:DropDownList ID="drpSubUnitId" runat="server" Label="开车分包单位" LabelAlign="Right" LabelWidth="150px" Required="true" ShowRedStar="true"></f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtIntroductions" runat="server" Label="企业情况简介" LabelAlign="Right" LabelWidth="150px" MaxLength="1000">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtAchievement" runat="server" Label="类似操作业绩" LabelAlign="Right" LabelWidth="150px" MaxLength="1000">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtCooperation" runat="server" Label="与五环合作历史" LabelAlign="Right" LabelWidth="150px" MaxLength="1000">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpUnitWorkIds" runat="server" Label="意向分包装置或单元" LabelAlign="Right" LabelWidth="150px" EnableMultiSelect="true" EnableCheckBoxSelect="true"></f:DropDownList>
</Items>
</f:FormRow>--%>
<%-- <f:FormRow>
<Items>
<f:RadioButtonList ID="rblIsInvited" runat="server" Label="是否拟邀" LabelAlign="Right" LabelWidth="150px">
<f:RadioItem Value="True" Text="是" Selected="true" />
<f:RadioItem Value="False" Text="否" />
</f:RadioButtonList>
</Items>
</f:FormRow>--%>
<%-- <f:FormRow>
<Items>
<f:TextArea ID="txtRemark" runat="server" Label="备注" LabelAlign="Right" LabelWidth="150px" MaxLength="500">
</f:TextArea>
</Items>
</f:FormRow>--%>
<f:FormRow runat="server">
<Items>
<f:CheckBoxList ID="DriverSubName" Label="开车分包类别" runat="server" LabelAlign="Right" LabelWidth="150px" Required="True" ShowRedStar="True" ></f:CheckBoxList>
<f:CheckBoxList ID="SubcontractingTypes" Label="开车分包类别" runat="server" LabelAlign="Right" LabelWidth="150px" Required="True" ShowRedStar="True" ></f:CheckBoxList>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:dropdownlist ID="drpstate" Label="分包状态" LabelAlign="Right" LabelWidth="150px" Required="true" ShowRedStar="true" runat="server" ></f:dropdownlist>
</Items>
</f:FormRow>
<f:FormRow runat="server">
@@ -18,10 +18,15 @@ namespace FineUIPro.Web.TestRun.DriverSub
//BLL.UnitService.InitUnitDownList(this.drpSubUnitId, this.CurrUser.LoginProjectId, true);
//BLL.UnitWorkService.InitUnitWorkDropDownList(this.drpUnitWorkIds, this.CurrUser.LoginProjectId, true);
string id = Request.Params["id"];
DriverSubName.DataSource=DropListService.drpDriverSubNameList();
DriverSubName.DataTextField = "Text";
DriverSubName.DataValueField = "Value";
DriverSubName.DataBind();
SubcontractingTypes.DataSource=DropListService.drpDriverSubNameList();
SubcontractingTypes.DataTextField = "Text";
SubcontractingTypes.DataValueField = "Value";
SubcontractingTypes.DataBind();
drpstate.DataSource = DropListService.drpDriverSubPlanStateList();
drpstate.DataTextField = "Text";
drpstate.DataValueField = "Value";
drpstate.DataBind();
if (!string.IsNullOrEmpty(id))
{
Model.DriverSub_DriverSubPlan data = BLL.DriverSubPlanService.GetDriverSubPlanById(id);
@@ -29,7 +34,8 @@ namespace FineUIPro.Web.TestRun.DriverSub
{
this.hdId.Text = id;
this.txtCode.Text = data.Code;
this.DriverSubName.SelectedValueArray= data.DriverSubNames.Split(',');
this.SubcontractingTypes.SelectedValueArray= data.SubcontractingTypes.Split(',');
this.drpstate.SelectedValue= data.State.ToString();
//if (!string.IsNullOrEmpty(data.SubUnitId))
//{
// this.drpSubUnitId.SelectedValue = data.SubUnitId;
@@ -70,41 +76,12 @@ namespace FineUIPro.Web.TestRun.DriverSub
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
//if (this.drpSubUnitId.SelectedValue==BLL.Const._Null)
//{
// Alert.ShowInTop("请选择开车分包单位!", MessageBoxIcon.Warning);
// return;
//}
string id = Request.Params["id"];
Model.DriverSub_DriverSubPlan newData = new Model.DriverSub_DriverSubPlan();
newData.Code = this.txtCode.Text.Trim();
newData.DriverSubNames= GetStringByArray(this.DriverSubName.SelectedValueArray);
//if (this.drpSubUnitId.SelectedValue != BLL.Const._Null)
//{
// newData.SubUnitId = this.drpSubUnitId.SelectedValue;
//}
//newData.Introductions = this.txtIntroductions.Text.Trim();
//newData.Achievement = this.txtAchievement.Text.Trim();
//newData.Cooperation = this.txtCooperation.Text.Trim();
//if (!string.IsNullOrEmpty(this.drpUnitWorkIds.SelectedValue))
//{
// newData.InstallationIds = GetStringByArray(this.drpUnitWorkIds.SelectedValueArray);
// string unitWorkNames = string.Empty;
// foreach (var item in this.drpUnitWorkIds.SelectedValueArray)
// {
// var unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(item);
// if (unitWork!=null)
// {
// unitWorkNames += unitWork.UnitWorkName + ",";
// }
// }
// if (!string.IsNullOrEmpty(unitWorkNames))
// {
// newData.InstallationNames = unitWorkNames.Substring(0, unitWorkNames.LastIndexOf(","));
// }
//}
//newData.IsInvited = Convert.ToBoolean(this.rblIsInvited.SelectedValue);
//newData.Remark = this.txtRemark.Text.Trim();
newData.SubcontractingTypes = GetStringByArray(this.SubcontractingTypes.SelectedValueArray);
newData.State = int.Parse(drpstate.SelectedValue);
newData.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(id))
{
@@ -114,13 +114,22 @@ namespace FineUIPro.Web.TestRun.DriverSub
protected global::FineUIPro.TextBox txtCode;
/// <summary>
/// DriverSubName 控件。
/// SubcontractingTypes 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList DriverSubName;
protected global::FineUIPro.CheckBoxList SubcontractingTypes;
/// <summary>
/// drpstate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpstate;
/// <summary>
/// Panel3 控件。
@@ -0,0 +1,61 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DriverSubSetContactorEdit.aspx.cs" Inherits="FineUIPro.Web.TestRun.DriverSub.DriverSubSetContactorEdit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑开车分包联络</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" OnClick="btnSave_Click" Icon="SystemSave" runat="server" ToolTip="保存" Text="保存" ValidateForms="SimpleForm1">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Text="关闭" runat="server" Icon="SystemClose" Size="Medium">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:DropDownList runat="server" ID="drpCatalystLoading" AutoSelectFirstItem="false" EmptyText="请从下拉选项中选择" MatchFieldWidth="false" Label="催化剂装填" LabelWidth="130px" LabelAlign="Right" Required="True" ShowRedStar="True" Hidden="True">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList runat="server" ID="drpOven" AutoSelectFirstItem="false" EmptyText="请从下拉选项中选择" MatchFieldWidth="false" Label="烘炉" LabelWidth="130px" LabelAlign="Right" Required="True" ShowRedStar="True" Hidden="True">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList runat="server" ID="drpChemicalCleaning" AutoSelectFirstItem="false" EmptyText="请从下拉选项中选择" MatchFieldWidth="false" Label="化学清洗" LabelWidth="130px" LabelAlign="Right" Required="True" ShowRedStar="True" Hidden="True">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList runat="server" ID="drpDrivingTeam" AutoSelectFirstItem="false" EmptyText="请从下拉选项中选择" MatchFieldWidth="false" Label="开车队" LabelWidth="130px" LabelAlign="Right" Required="True" ShowRedStar="True" Hidden="True">
</f:DropDownList>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
</form>
</body>
</html>
@@ -0,0 +1,93 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.TestRun.DriverSub
{
public partial class DriverSubSetContactorEdit : PageBase
{
public string DriverSubPlanId
{
get { return (string)ViewState["DriverSubPlanId"]; }
set { ViewState["DriverSubPlanId"] = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
DriverSubPlanId = Request.Params["DriverSubPlanId"];
Bind();
}
}
void Save()
{
DriverSubContactService.SetBidirectional(DriverSubPlanId, drpCatalystLoading.SelectedValue);
DriverSubContactService.SetBidirectional(DriverSubPlanId, drpOven.SelectedValue);
DriverSubContactService.SetBidirectional(DriverSubPlanId, drpChemicalCleaning.SelectedValue);
DriverSubContactService.SetBidirectional(DriverSubPlanId, drpDrivingTeam.SelectedValue);
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
void Bind()
{
var model = BLL.DriverSubPlanService.GetDriverSubPlanById(DriverSubPlanId);
if (model != null)
{
var subcontractingtypeList= model.SubcontractingTypes.Split(',');
foreach (string item in subcontractingtypeList)
{
if (item.Contains("1"))
{
drpCatalystLoading.Hidden = false;
DriverSubContactService.InitDropListByDriverSubPlanId(DriverSubPlanId,item, drpCatalystLoading);
drpCatalystLoading.SelectedValue = DriverSubContactService
.GetBidirectional(DriverSubPlanId, "1")?.DriverSubContractorsId;
}
else if (item.Contains("2"))
{
drpOven.Hidden = false;
DriverSubContactService.InitDropListByDriverSubPlanId(DriverSubPlanId, item, drpOven);
drpOven.SelectedValue = DriverSubContactService
.GetBidirectional(DriverSubPlanId, "2")?.DriverSubContractorsId;
}
else if (item.Contains("3"))
{
drpChemicalCleaning.Hidden = false;
DriverSubContactService.InitDropListByDriverSubPlanId(DriverSubPlanId, item, drpChemicalCleaning);
drpChemicalCleaning.SelectedValue = DriverSubContactService
.GetBidirectional(DriverSubPlanId, "3")?.DriverSubContractorsId;
}
else if (item.Contains("4"))
{
drpDrivingTeam.Hidden = false;
DriverSubContactService.InitDropListByDriverSubPlanId(DriverSubPlanId, item, drpDrivingTeam);
drpDrivingTeam.SelectedValue = DriverSubContactService
.GetBidirectional(DriverSubPlanId, "4")?.DriverSubContractorsId;
}
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
Save();
}
}
}
@@ -0,0 +1,125 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.TestRun.DriverSub
{
public partial class DriverSubSetContactorEdit
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// drpCatalystLoading 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCatalystLoading;
/// <summary>
/// drpOven 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpOven;
/// <summary>
/// drpChemicalCleaning 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpChemicalCleaning;
/// <summary>
/// drpDrivingTeam 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpDrivingTeam;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
}
}