This commit is contained in:
2025-12-22 21:16:45 +08:00
1273 changed files with 65829 additions and 11147 deletions
@@ -22,7 +22,7 @@ namespace FineUIPro.Web.ProjectData
{
if (!IsPostBack)
{
MainItemId = Request.Params["MainItemId"];
MainItemId = Request.Params["MainItemId"];
var MainItem = Funs.DB.ProjectData_MainItem.FirstOrDefault(x => x.MainItemId == MainItemId);
if (MainItem != null)
{
@@ -32,7 +32,7 @@ namespace FineUIPro.Web.ProjectData
ProjectCode = BLL.ProjectService.GetProjectCodeByProjectId(this.CurrUser.LoginProjectId);
}
}
#region 保存事件
/// <summary>
@@ -42,10 +42,10 @@ namespace FineUIPro.Web.ProjectData
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
var MainItem = Funs.DB.ProjectData_MainItem.FirstOrDefault(x => x.MainItemId == MainItemId);
var MainItem = Funs.DB.ProjectData_MainItem.FirstOrDefault(x => x.MainItemId == MainItemId);
if (MainItem != null)
{
MainItem.Coordinate=txtLoc.Text.Trim();
MainItem.Coordinate = txtLoc.Text.Trim();
Funs.DB.SubmitChanges();
}
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(txtLoc.Text.Trim())
@@ -53,6 +53,6 @@ namespace FineUIPro.Web.ProjectData
}
#endregion
}
}
@@ -1,10 +1,9 @@
using BLL;
using Model;
using System;
using System.Linq;
using System.ServiceModel;
using System.Text.RegularExpressions;
using System.Data;
using System.Linq;
using System.Text.RegularExpressions;
namespace FineUIPro.Web.ProjectData
{
@@ -40,6 +39,7 @@ namespace FineUIPro.Web.ProjectData
this.ProjectId = Request.QueryString["ProjectId"];
UnitService.InitBranchUnitDropDownList(this.drpUnit, true, true);
BindGrid();
this.drpUnit.SelectedValue = Const.UnitId_SEDIN;
if (!String.IsNullOrEmpty(this.ProjectId))
{
@@ -69,6 +69,20 @@
</f:RadioButtonList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:CheckBox ID="ckPressMustCheckBItem" runat="server" Label="压力试验尾项条件" Text="必须B项整改完成" LabelWidth="200">
</f:CheckBox>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:RadioButtonList ID="rbMaterialColorAttribute" runat="server" Label="材质标识关联属性" LabelWidth="200">
<f:RadioItem Value="1" Text="颜色名称" Selected="true" />
<f:RadioItem Value="2" Text="色卡号" />
</f:RadioButtonList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:CheckBox ID="ckbDayReport" runat="server" Label="焊接日报编号" Text="是否自动生成" LabelWidth="200">
@@ -117,8 +131,8 @@
</Rows>
</f:Form>
</Items>
</f:GroupPanel>
<f:GroupPanel ID="GroupPanel3" Layout="Anchor" Title="模型颜色设置" runat="server">
</f:GroupPanel>
<f:GroupPanel ID="GroupPanel3" Layout="Anchor" Title="模型颜色设置" runat="server">
<Items>
<f:Form ID="Form3" ShowBorder="false" ShowHeader="false" AutoScroll="true"
Layout="VBox" BodyPadding="10px" runat="server" RedStarPosition="BeforeText"
@@ -127,16 +141,16 @@
<f:FormRow runat="server">
<Items>
<f:NumberBox ID="txtPipelineNOComplete" Label="未完成(透明显示)" runat="server" MaxValue="100" Hidden="true"
LabelWidth="180px" NoNegative="true" NoDecimal="true">
LabelWidth="180px" NoNegative="true" NoDecimal="true">
</f:NumberBox>
<f:NumberBox ID="txtPipelineComplete" Label="已完成(透明显示)" runat="server" MaxValue="100" Hidden="true"
LabelWidth="180px" NoNegative="true" NoDecimal="true">
LabelWidth="180px" NoNegative="true" NoDecimal="true">
</f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:DropDownList ID="drpJointNOCompleteColor" Label="未完成(颜色)" runat="server" LabelWidth="180px">
<f:DropDownList ID="drpJointNOCompleteColor" Label="未完成(颜色)" runat="server" LabelWidth="180px">
<f:ListItem Value="#FF0000" Text="红" />
<f:ListItem Value="#FFFF00" Text="黄" />
<f:ListItem Value="#00FF00" Text="绿" />
@@ -149,7 +163,6 @@
</f:DropDownList>
<%--<f:TextBox ID="txtJointNOCompleteColor" runat="server" Label="焊口未完成" LabelWidth="180px"></f:TextBox>
<f:TextBox ID="txtJointCompleteColor" runat="server" Label="焊口已完成" LabelWidth="180px"></f:TextBox>--%>
</Items>
</f:FormRow>
</Rows>
@@ -2,6 +2,8 @@
using BLL.Common;
using System;
using System.Linq;
using System.Collections.Generic;
using FineUIPro;
using System.Text.RegularExpressions;
namespace FineUIPro.Web.common.ProjectSet
@@ -50,47 +52,6 @@ namespace FineUIPro.Web.common.ProjectSet
ShowNotify("请选择项目!", MessageBoxIcon.Warning);
return;
}
#region 通用
///通用
var getProject = ProjectService.GetProjectByProjectId(projectId);
if (getProject != null)
{
getProject.IsYunMou = this.ckbIsYunMou.Checked;
if (this.ckbIsYunMou.Checked)
{
var token = YunMouHelper.getToken();
string data;
data = Regex.Replace(getProject.ProjectCode, "[^0-9A-Fa-f]", "", RegexOptions.IgnoreCase);
YunMouHelper.addDevicesGroups(getProject.ProjectName, data, token);
var groupId = YunMouHelper.addPermissionGroups(getProject.ProjectName, token);
if (!string.IsNullOrEmpty(groupId))
{
getProject.YunMouGroupId = groupId;
}
//var ids = YunMouHelper.AddConsumer(token);
// YunMouHelper.consumerMessage(ids, token);
//var res1 = YunMouHelper.getPerson("340824199505010015", token);
//var res2 = YunMouHelper.getPerson("340824199505010016", token);
//var res3 = YunMouHelper.getPerson("340824199505010014", token);
// var res = YunMouHelper.personCreate("340824199505010015", "李超", "15201934796", "FileUpload\\PersonBaseInfo\\2024-6\\638543008082105530_lichao.jpg", token);
//var res = YunMouHelper.addPersonsToGroups("badad00cc88d40a89e1601fb7ed193a0", new string[] { "340824199505010015" }, token);
// var res = YunMouHelper.addDevicesToGroups("badad00cc88d40a89e1601fb7ed193a0", new string[] { "FC2347699" }, token);
//YunMouHelper.setDefence("FC2347699", "1", token);
}
else
{
var token = YunMouHelper.getToken();
string data;
data = Regex.Replace(getProject.ProjectCode, "[^0-9A-Fa-f]", "", RegexOptions.IgnoreCase);
YunMouHelper.deleteDevicesGroups(data, token);//删除设备分组,如果有子节点,可以不删除
}
Funs.DB.SubmitChanges();
}
#endregion
#region 焊接
// 焊接
Model.Project_Sys_Set dayReport = BLL.Project_SysSetService.GetSysSetBySetId("1", projectId);
@@ -192,455 +153,262 @@ namespace FineUIPro.Web.common.ProjectSet
pdms.IsAuto = false;
}
if (ckbDayReport.Checked)
private void SaveColorModelSettings(string projectId)
{
UpsertByName("管线未完成", projectId, this.txtPipelineNOComplete.Text.Trim());
UpsertByName("管线已完成", projectId, this.txtPipelineComplete.Text.Trim());
UpsertByName("焊口未完成", projectId, this.drpJointNOCompleteColor.SelectedValue.Trim());
UpsertByName("焊口已完成", projectId, this.drpJointCompleteColor.SelectedValue.Trim());
}
private void SaveQualitySettings(string projectId)
{
UpsertByName("检试验设备到期提醒天数", projectId, this.txtRemindDay.Text.Trim());
UpsertByName("月报开始日期", projectId, this.txtStarTime.Text.Trim());
UpsertByName("月报结束日期", projectId, this.txtEndTime.Text.Trim());
}
#endregion
#region Upsert Helpers
private void UpsertIsAutoById(string setId, string projectId, bool value)
{
var existing = BLL.Project_SysSetService.GetSysSetBySetId(setId, projectId);
if (existing != null)
{
dayReport.IsAuto = true;
existing.IsAuto = value;
BLL.Project_SysSetService.UpdateSet(existing);
}
else
{
dayReport.IsAuto = false;
var newSet = new Model.Project_Sys_Set
{
SetId = setId,
ProjectId = projectId,
IsAuto = value
};
BLL.Project_SysSetService.AddSet(newSet);
}
}
if (ckbPoint.Checked)
private void UpsertValueById(string setId, string projectId, string value, string setName = null)
{
if (string.IsNullOrEmpty(value)) return;
var existing = BLL.Project_SysSetService.GetSysSetBySetId(setId, projectId);
if (existing != null)
{
point.IsAuto = true;
existing.SetValue = value;
if (!string.IsNullOrEmpty(setName)) existing.SetName = setName;
BLL.Project_SysSetService.UpdateSet(existing);
}
else
{
point.IsAuto = false;
var newSet = new Model.Project_Sys_Set
{
SetId = setId,
ProjectId = projectId,
SetValue = value,
SetName = setName
};
BLL.Project_SysSetService.AddSet(newSet);
}
}
if (robStandard.SelectedValue == "1")
private void UpsertByName(string setName, string projectId, string value)
{
if (string.IsNullOrEmpty(value)) return;
var existing = BLL.Project_SysSetService.GetSysSetBySetName(setName, projectId);
if (existing != null)
{
trust.IsAuto = true;
trust.SetValue = null;
}
else if (robStandard.SelectedValue == "2")
{
trust.IsAuto = false;
trust.SetValue = null;
existing.SetValue = value;
BLL.Project_SysSetService.UpdateSet(existing);
}
else
{
trust.IsAuto = null;
trust.SetValue = robStandard.SelectedValue;
}
string lists = string.Empty;
if (cb1.Checked)
{
lists += "1|";
}
if (cb2.Checked)
{
lists += "2|";
}
if (cb3.Checked)
{
lists += "3|";
}
if (cb4.Checked)
{
lists += "4|";
}
if (cb5.Checked)
{
lists += "5|";
}
if (cb6.Checked)
{
lists += "6|";
}
if (cb7.Checked)
{
lists += "7|";
}
if (!string.IsNullOrEmpty(lists))
{
lists = lists.Substring(0, lists.LastIndexOf('|'));
batch.IsAuto = true;
batch.SetValue = lists;
}
BLL.Project_SysSetService.UpdateSet(dayReport);
BLL.Project_SysSetService.UpdateSet(point);
BLL.Project_SysSetService.UpdateSet(pdms);
BLL.Project_SysSetService.UpdateSet(trust);
BLL.Project_SysSetService.UpdateSet(batch);
//this.Show(projectId);
#endregion
#region 颜色模型设置
Model.Project_Sys_Set Model_PipelineNOComplete = BLL.Project_SysSetService.GetSysSetBySetName("管线未完成", this.CurrUser.LoginProjectId);
if (Model_PipelineNOComplete != null)
{
if (!string.IsNullOrEmpty(this.txtPipelineNOComplete.Text.Trim()))
var newSet = new Model.Project_Sys_Set
{
Model_PipelineNOComplete.SetValue = this.txtPipelineNOComplete.Text.Trim();
BLL.Project_SysSetService.UpdateSet(Model_PipelineNOComplete);
}
SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)),
ProjectId = projectId,
SetName = setName,
SetValue = value
};
BLL.Project_SysSetService.AddSet(newSet);
}
}
private void UpsertTrustSetting(string setId, string projectId, string selectedValue)
{
var existing = BLL.Project_SysSetService.GetSysSetBySetId(setId, projectId);
if (existing != null)
{
if (selectedValue == "1")
{
existing.IsAuto = true;
existing.SetValue = null;
}
else if (selectedValue == "2")
{
existing.IsAuto = false;
existing.SetValue = null;
}
else
{
existing.IsAuto = null;
existing.SetValue = selectedValue;
}
BLL.Project_SysSetService.UpdateSet(existing);
}
else
{
if (!string.IsNullOrEmpty(this.txtPipelineNOComplete.Text.Trim()))
var newSet = new Model.Project_Sys_Set
{
Model.Project_Sys_Set newModel_PipelineNOComplete = new Model.Project_Sys_Set()
{
SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)),
ProjectId = this.CurrUser.LoginProjectId,
SetName = "管线未完成",
SetValue = this.txtPipelineNOComplete.Text.Trim(),
};
BLL.Project_SysSetService.AddSet(newModel_PipelineNOComplete);
SetId = setId,
ProjectId = projectId
};
if (selectedValue == "1")
{
newSet.IsAuto = true;
}
else if (selectedValue == "2")
{
newSet.IsAuto = false;
}
else
{
newSet.IsAuto = null;
newSet.SetValue = selectedValue;
}
BLL.Project_SysSetService.AddSet(newSet);
}
Model.Project_Sys_Set Model_PipelineComplete = BLL.Project_SysSetService.GetSysSetBySetName("管线已完成", this.CurrUser.LoginProjectId);
if (Model_PipelineComplete != null)
}
private void UpsertBatchSetting(string setId, string projectId)
{
var items = new List<string>();
if (cb1.Checked) items.Add("1");
if (cb2.Checked) items.Add("2");
if (cb3.Checked) items.Add("3");
if (cb4.Checked) items.Add("4");
if (cb5.Checked) items.Add("5");
if (cb6.Checked) items.Add("6");
if (cb7.Checked) items.Add("7");
if (items.Count == 0) return;
var lists = string.Join("|", items);
var existing = BLL.Project_SysSetService.GetSysSetBySetId(setId, projectId);
if (existing != null)
{
if (!string.IsNullOrEmpty(this.txtPipelineComplete.Text.Trim()))
{
Model_PipelineComplete.SetValue = this.txtPipelineComplete.Text.Trim();
BLL.Project_SysSetService.UpdateSet(Model_PipelineComplete);
}
existing.IsAuto = true;
existing.SetValue = lists;
BLL.Project_SysSetService.UpdateSet(existing);
}
else
{
if (!string.IsNullOrEmpty(this.txtPipelineComplete.Text.Trim()))
var newSet = new Model.Project_Sys_Set
{
Model.Project_Sys_Set newModel = new Model.Project_Sys_Set()
{
SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)),
ProjectId = this.CurrUser.LoginProjectId,
SetName = "管线已完成",
SetValue = this.txtPipelineComplete.Text.Trim(),
};
BLL.Project_SysSetService.AddSet(newModel);
}
SetId = setId,
ProjectId = projectId,
IsAuto = true,
SetValue = lists
};
BLL.Project_SysSetService.AddSet(newSet);
}
Model.Project_Sys_Set Model_JointNOCompleteColor = BLL.Project_SysSetService.GetSysSetBySetName("焊口未完成", this.CurrUser.LoginProjectId);
if (Model_JointNOCompleteColor != null)
{
if (!string.IsNullOrEmpty(this.drpJointNOCompleteColor.SelectedValue.Trim()))
{
Model_JointNOCompleteColor.SetValue = this.drpJointNOCompleteColor.SelectedValue.Trim();
BLL.Project_SysSetService.UpdateSet(Model_JointNOCompleteColor);
}
}
else
{
if (!string.IsNullOrEmpty(this.drpJointNOCompleteColor.SelectedValue.Trim()))
{
Model.Project_Sys_Set newModel = new Model.Project_Sys_Set()
{
SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)),
ProjectId = this.CurrUser.LoginProjectId,
SetName = "焊口未完成",
SetValue = this.drpJointNOCompleteColor.SelectedValue.Trim(),
};
BLL.Project_SysSetService.AddSet(newModel);
}
}
Model.Project_Sys_Set Model_JointCompleteColor = BLL.Project_SysSetService.GetSysSetBySetName("焊口已完成", this.CurrUser.LoginProjectId);
if (Model_JointCompleteColor != null)
{
if (!string.IsNullOrEmpty(this.drpJointCompleteColor.SelectedValue.Trim()))
{
Model_JointCompleteColor.SetValue = this.drpJointCompleteColor.SelectedValue.Trim();
BLL.Project_SysSetService.UpdateSet(Model_JointCompleteColor);
}
}
else
{
if (!string.IsNullOrEmpty(this.drpJointCompleteColor.SelectedValue.Trim()))
{
Model.Project_Sys_Set newModel = new Model.Project_Sys_Set()
{
SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)),
ProjectId = this.CurrUser.LoginProjectId,
SetName = "焊口已完成",
SetValue = this.drpJointCompleteColor.SelectedValue.Trim(),
};
BLL.Project_SysSetService.AddSet(newModel);
}
}
#endregion
#region 质量
Model.Project_Sys_Set CheckEquipmentDay = BLL.Project_SysSetService.GetSysSetBySetName("检试验设备到期提醒天数", this.CurrUser.LoginProjectId);
if (CheckEquipmentDay != null)
{
if (!string.IsNullOrEmpty(this.txtRemindDay.Text.Trim()))
{
CheckEquipmentDay.SetValue = this.txtRemindDay.Text.Trim();
BLL.Project_SysSetService.UpdateSet(CheckEquipmentDay);
}
}
else
{
if (!string.IsNullOrEmpty(this.txtRemindDay.Text.Trim()))
{
Model.Project_Sys_Set newCheckEquipmentDay = new Model.Project_Sys_Set();
newCheckEquipmentDay.SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set));
newCheckEquipmentDay.ProjectId = this.CurrUser.LoginProjectId;
newCheckEquipmentDay.SetName = "检试验设备到期提醒天数";
newCheckEquipmentDay.SetValue = this.txtRemindDay.Text.Trim();
BLL.Project_SysSetService.AddSet(newCheckEquipmentDay);
}
}
Model.Project_Sys_Set CheckMonthStartDay = BLL.Project_SysSetService.GetSysSetBySetName("月报开始日期", this.CurrUser.LoginProjectId);
if (CheckMonthStartDay != null)
{
if (!string.IsNullOrEmpty(this.txtStarTime.Text.Trim()))
{
CheckMonthStartDay.SetValue = this.txtStarTime.Text.Trim();
BLL.Project_SysSetService.UpdateSet(CheckMonthStartDay);
}
}
else
{
if (!string.IsNullOrEmpty(this.txtStarTime.Text.Trim()))
{
Model.Project_Sys_Set newCheckEquipmentDay = new Model.Project_Sys_Set();
newCheckEquipmentDay.SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set));
newCheckEquipmentDay.ProjectId = this.CurrUser.LoginProjectId;
newCheckEquipmentDay.SetName = "月报开始日期";
newCheckEquipmentDay.SetValue = this.txtStarTime.Text.Trim();
BLL.Project_SysSetService.AddSet(newCheckEquipmentDay);
}
}
Model.Project_Sys_Set CheckMonthEndDay = BLL.Project_SysSetService.GetSysSetBySetName("月报结束日期", this.CurrUser.LoginProjectId);
if (CheckMonthEndDay != null)
{
if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim()))
{
CheckMonthEndDay.SetValue = this.txtEndTime.Text.Trim();
BLL.Project_SysSetService.UpdateSet(CheckMonthEndDay);
}
}
else
{
if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim()))
{
Model.Project_Sys_Set newCheckEquipmentDay = new Model.Project_Sys_Set();
newCheckEquipmentDay.SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set));
newCheckEquipmentDay.ProjectId = this.CurrUser.LoginProjectId;
newCheckEquipmentDay.SetName = "月报结束日期";
newCheckEquipmentDay.SetValue = this.txtEndTime.Text.Trim();
BLL.Project_SysSetService.AddSet(newCheckEquipmentDay);
}
}
#endregion
this.Show(projectId);
//BLL.Sys_LogService.AddLog(BLL.Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, "提交项目环境设置");
Alert.ShowInTop("提交成功!", MessageBoxIcon.Success);
}
#endregion
#region 页面呈现
/// <summary>
///
/// 页面呈现
/// </summary>
private void Show(string projectId)
{
var q = from x in Funs.DB.Project_Sys_Set where x.ProjectId == projectId select x;
if (q.Count() > 0)
if (q.Any())
{
foreach (var s in q)
{
if (s.SetId == "1")
{
if (s.IsAuto == true)
{
this.ckbDayReport.Checked = true;
}
else
{
this.ckbDayReport.Checked = false;
}
}
else if (s.SetId == "2")
{
if (s.IsAuto == true)
{
this.ckbPoint.Checked = true;
}
else
{
this.ckbPoint.Checked = false;
}
}
else if (s.SetId == "3")
{
if (s.IsAuto == true)
{
this.robStandard.SelectedValue = "1";
}
if (s.IsAuto == false)
{
this.robStandard.SelectedValue = "2";
}
if (s.SetValue == "3")
{
this.robStandard.SelectedValue = "3";
}
if (s.SetValue == "4")
{
this.robStandard.SelectedValue = "4";
}
}
else if (s.SetId == "4")
{
if (s.IsAuto == true)
{
this.ckbPdms.Checked = true;
}
else
{
this.ckbPdms.Checked = false;
}
}
else if (s.SetId == "5")
{
cb4.Checked = false;
cb5.Checked = false;
cb6.Checked = false;
cb7.Checked = false;
var lists = s.SetValue.Split('|');
foreach (var item in lists)
{
if (item == "1")
{
cb1.Checked = true;
}
else if (item == "2")
{
cb2.Checked = true;
}
else if (item == "3")
{
cb3.Checked = true;
}
else if (item == "4")
{
cb4.Checked = true;
}
else if (item == "5")
{
cb5.Checked = true;
}
else if (item == "6")
{
cb6.Checked = true;
}
else if (item == "7")
{
cb7.Checked = true;
}
}
}
else if (s.SetId == "6")
{
if (s.IsAuto == true)
{
this.ckbJointB.Checked = true;
}
else
{
this.ckbJointB.Checked = false;
}
}
else if (s.SetId == "7")
{
if (s.IsAuto == true)
{
this.ckbThickness.Checked = true;
}
else
{
this.ckbThickness.Checked = false;
}
}
else if (s.SetId == "8")
{
if (s.SetValue == "1")
{
this.rblPressUnit.SelectedValue = "1";
}
else
{
this.rblPressUnit.SelectedValue = "2";
}
}
else if (s.SetId == "9")
{
var dict = q.ToDictionary(x => x.SetId, x => x);
this.AvevaNetUrl.Text = s.SetValue;
}
}
SetCheckFromDict(dict, "1", this.ckbDayReport);
SetCheckFromDict(dict, "2", this.ckbPoint);
SetRobStandardFromDict(dict, "3");
SetCheckFromDict(dict, "4", this.ckbPdms);
SetBatchFromDict(dict, "5");
SetCheckFromDict(dict, "6", this.ckbJointB);
SetCheckFromDict(dict, "7", this.ckbThickness);
SetRadioValueFromDict(dict, "8", this.rblPressUnit, defaultValue: "2");
if (dict.ContainsKey("9")) this.AvevaNetUrl.Text = dict["9"].SetValue;
SetCheckFromDict(dict, "10", this.ckPressMustCheckBItem);
if (dict.ContainsKey("11")) this.rbMaterialColorAttribute.SelectedValue = dict["11"].SetValue == "1" ? "1" : "2";
}
//颜色模型设置
Model.Project_Sys_Set Model_PipelineNOComplete = BLL.Project_SysSetService.GetSysSetBySetName("管线未完成", this.CurrUser.LoginProjectId);
if (Model_PipelineNOComplete != null)
{
this.txtPipelineNOComplete.Text = Model_PipelineNOComplete.SetValue;
}
Model.Project_Sys_Set Model_PipelineComplete = BLL.Project_SysSetService.GetSysSetBySetName("管线已完成", this.CurrUser.LoginProjectId);
if (Model_PipelineComplete != null)
{
this.txtPipelineComplete.Text = Model_PipelineComplete.SetValue;
}
Model.Project_Sys_Set Model_JointNOCompleteColor = BLL.Project_SysSetService.GetSysSetBySetName("焊口未完成", this.CurrUser.LoginProjectId);
if (Model_JointNOCompleteColor != null)
{
this.drpJointNOCompleteColor.SelectedValue = Model_JointNOCompleteColor.SetValue;
}
Model.Project_Sys_Set Model_JointCompleteColor = BLL.Project_SysSetService.GetSysSetBySetName("焊口已完成", this.CurrUser.LoginProjectId);
if (Model_JointCompleteColor != null)
{
this.drpJointCompleteColor.SelectedValue = Model_JointCompleteColor.SetValue;
}
var m1 = BLL.Project_SysSetService.GetSysSetBySetName("管线未完成", this.CurrUser.LoginProjectId);
if (m1 != null) this.txtPipelineNOComplete.Text = m1.SetValue;
var m2 = BLL.Project_SysSetService.GetSysSetBySetName("管线已完成", this.CurrUser.LoginProjectId);
if (m2 != null) this.txtPipelineComplete.Text = m2.SetValue;
var m3 = BLL.Project_SysSetService.GetSysSetBySetName("焊口未完成", this.CurrUser.LoginProjectId);
if (m3 != null) this.drpJointNOCompleteColor.SelectedValue = m3.SetValue;
var m4 = BLL.Project_SysSetService.GetSysSetBySetName("焊口已完成", this.CurrUser.LoginProjectId);
if (m4 != null) this.drpJointCompleteColor.SelectedValue = m4.SetValue;
///质量页面呈现
Model.Project_Sys_Set CheckEquipmentDay = BLL.Project_SysSetService.GetSysSetBySetName("检试验设备到期提醒天数", this.CurrUser.LoginProjectId);
if (CheckEquipmentDay != null)
var c1 = BLL.Project_SysSetService.GetSysSetBySetName("检试验设备到期提醒天数", this.CurrUser.LoginProjectId);
if (c1 != null) this.txtRemindDay.Text = c1.SetValue;
var c2 = BLL.Project_SysSetService.GetSysSetBySetName("月报开始日期", this.CurrUser.LoginProjectId);
if (c2 != null) this.txtStarTime.Text = c2.SetValue; else this.txtStarTime.Text = "25";
var c3 = BLL.Project_SysSetService.GetSysSetBySetName("月报结束日期", this.CurrUser.LoginProjectId);
if (c3 != null) this.txtEndTime.Text = c3.SetValue; else this.txtEndTime.Text = "24";
}
private void SetCheckFromDict(Dictionary<string, Model.Project_Sys_Set> dict, string setId, CheckBox checkBox)
{
if (!dict.ContainsKey(setId)) return;
var s = dict[setId];
checkBox.Checked = s.IsAuto == true;
}
private void SetRobStandardFromDict(Dictionary<string, Model.Project_Sys_Set> dict, string setId)
{
if (!dict.ContainsKey(setId)) return;
var s = dict[setId];
if (s.IsAuto == true) this.robStandard.SelectedValue = "1";
else if (s.IsAuto == false) this.robStandard.SelectedValue = "2";
else if (s.SetValue == "3") this.robStandard.SelectedValue = "3";
else if (s.SetValue == "4") this.robStandard.SelectedValue = "4";
}
private void SetBatchFromDict(Dictionary<string, Model.Project_Sys_Set> dict, string setId)
{
if (!dict.ContainsKey(setId)) return;
// reset some checkboxes first
cb1.Checked = cb2.Checked = cb3.Checked = cb4.Checked = cb5.Checked = cb6.Checked = cb7.Checked = false;
var s = dict[setId];
if (string.IsNullOrEmpty(s.SetValue)) return;
var items = s.SetValue.Split('|');
foreach (var item in items)
{
this.txtRemindDay.Text = CheckEquipmentDay.SetValue;
switch (item)
{
case "1": cb1.Checked = true; break;
case "2": cb2.Checked = true; break;
case "3": cb3.Checked = true; break;
case "4": cb4.Checked = true; break;
case "5": cb5.Checked = true; break;
case "6": cb6.Checked = true; break;
case "7": cb7.Checked = true; break;
}
}
Model.Project_Sys_Set CheckMonthStartDay = BLL.Project_SysSetService.GetSysSetBySetName("月报开始日期", this.CurrUser.LoginProjectId);
if (CheckMonthStartDay != null)
}
private void SetRadioValueFromDict(Dictionary<string, Model.Project_Sys_Set> dict, string setId, RadioButtonList rbl, string defaultValue = null)
{
if (!dict.ContainsKey(setId))
{
this.txtStarTime.Text = CheckMonthStartDay.SetValue;
}
else
{
this.txtStarTime.Text = "25";
}
Model.Project_Sys_Set CheckMonthEndDay = BLL.Project_SysSetService.GetSysSetBySetName("月报结束日期", this.CurrUser.LoginProjectId);
if (CheckMonthEndDay != null)
{
this.txtEndTime.Text = CheckMonthEndDay.SetValue;
}
else
{
this.txtEndTime.Text = "24";
if (defaultValue != null) rbl.SelectedValue = defaultValue;
return;
}
var s = dict[setId];
rbl.SelectedValue = s.SetValue ?? defaultValue;
}
#endregion
}
@@ -131,6 +131,24 @@ namespace FineUIPro.Web.common.ProjectSet
/// </remarks>
protected global::FineUIPro.RadioButtonList rblPressUnit;
/// <summary>
/// ckPressMustCheckBItem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckPressMustCheckBItem;
/// <summary>
/// rbMaterialColorAttribute 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rbMaterialColorAttribute;
/// <summary>
/// ckbDayReport 控件。
/// </summary>
@@ -1,7 +1,5 @@
using BLL;
using System;
using System.Data;
using System.Linq;
namespace FineUIPro.Web.ProjectData
{
@@ -178,7 +176,7 @@ namespace FineUIPro.Web.ProjectData
/// </summary>
private void BindGrid()
{
this.Grid1.DataSource =ProjectUnitService.GetProjectUnitItemList(this.ProjectId, this.UnitId);
this.Grid1.DataSource = ProjectUnitService.GetProjectUnitItemList(this.ProjectId, this.UnitId);
this.Grid1.PageIndex = 0;
this.Grid1.DataBind();
}
@@ -204,7 +202,7 @@ namespace FineUIPro.Web.ProjectData
reSetTable(true);
var trainTypeItem = ProjectUnitService.GetProjectUnitItemById(Grid1.SelectedRowID);
if (trainTypeItem != null)
{
{
this.txtContractNum.Text = trainTypeItem.ContractNum.ToString();
this.txtTotalMoney.Text = trainTypeItem.TotalMoney.ToString();
this.txtHSEMoney.Text = trainTypeItem.HSEMoney.ToString();
@@ -263,7 +261,7 @@ namespace FineUIPro.Web.ProjectData
reSetTable(false);
this.ShowNotify("保存成功!", MessageBoxIcon.Success);
this.BindGrid();
}
else
{
@@ -73,7 +73,7 @@ namespace FineUIPro.Web.ProjectData
this.BindGrid(projectUnit.ProjectId, projectUnit.UnitId);
}
}
}
}
}
@@ -57,7 +57,8 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList runat="server" ID="drpContract" Label="对应合同编号" LabelWidth="150px"></f:DropDownList>
<%--<f:DropDownList runat="server" ID="drpContract" Label="对应合同编号" LabelWidth="150px"></f:DropDownList>--%>
<f:TextBox runat="server" ID="txtContractId" Label="对应合同编号" LabelWidth="150px"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow runat="server">
@@ -71,7 +72,7 @@
<Items>
<f:Label runat="server" ID="txtMainItemAndDesignProfessional" Label="对应主项及设计专业" LabelWidth="150px"></f:Label>
<f:Button runat="server" ID="btnSelect" OnClick="btnSelect_Click" Text="选择"></f:Button>
<f:HiddenField runat="server" ID="hdMainItemAndDesignProfessionalIds"></f:HiddenField>
<f:TextBox runat="server" ID="hdMainItemAndDesignProfessionalIds" Hidden="true"></f:TextBox>
</Items>
</f:FormRow>
</Rows>
@@ -30,12 +30,12 @@ namespace FineUIPro.Web.ProjectData
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true);//施工
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSupervisorUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_3, true);//监理
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpNDEUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_5, true);//检测
//合同编号
this.drpContract.DataTextField = "ContractNum";
this.drpContract.DataValueField = "ContractId";
this.drpContract.DataSource = BLL.PHTGL_ContractReviewService.GetContractReview_CompleteData(this.CurrUser.LoginProjectId);
this.drpContract.DataBind();
Funs.FineUIPleaseSelect(this.drpContract);
////合同编号
//this.drpContract.DataTextField = "ContractNum";
//this.drpContract.DataValueField = "ContractId";
//this.drpContract.DataSource = BLL.PHTGL_ContractReviewService.GetContractReview_CompleteData(this.CurrUser.LoginProjectId);
//this.drpContract.DataBind();
//Funs.FineUIPleaseSelect(this.drpContract);
string UnitWorkId = Request.Params["UnitWorkId"];
if (!string.IsNullOrEmpty(UnitWorkId))
{
@@ -68,7 +68,7 @@ namespace FineUIPro.Web.ProjectData
}
if (!string.IsNullOrEmpty(UnitWork.ContractId))
{
this.drpContract.SelectedValue = UnitWork.ContractId;
this.txtContractId.Text = UnitWork.ContractId;
}
this.txtMainItemCode.Text = UnitWork.MainItemCode;
if (!string.IsNullOrEmpty(UnitWork.MainItemAndDesignProfessionalIds))
@@ -99,15 +99,15 @@ namespace FineUIPro.Web.ProjectData
UnitWork.ProjectId = this.CurrUser.LoginProjectId;
UnitWork.UnitWorkCode = this.txtUnitWorkCode.Text.Trim();
UnitWork.UnitWorkName = this.txtUnitWorkName.Text.Trim();
if (this.drpUnit.SelectedValue != BLL.Const._Null)
{
UnitWork.UnitId =string.Join(",", this.drpUnit.SelectedValueArray) ;
}
else
if (this.drpUnit.SelectedValue == BLL.Const._Null && this.drpUnit.SelectedValueArray.Length == 1)
{
Alert.ShowInTop("请选择施工单位!");
return;
}
else
{
UnitWork.UnitId = string.Join(",", this.drpUnit.SelectedValueArray);
}
if (this.drpSupervisorUnit.SelectedValue != BLL.Const._Null)
{
UnitWork.SupervisorUnitId = this.drpSupervisorUnit.SelectedValue;
@@ -124,14 +124,15 @@ namespace FineUIPro.Web.ProjectData
{
UnitWork.Costs = Convert.ToDecimal(this.txtCosts.Text.Trim());
}
if (this.drpContract.SelectedValue != BLL.Const._Null)
{
UnitWork.ContractId = this.drpContract.SelectedValue;
}
else
{
UnitWork.ContractId = null;
}
//if (this.drpContract.SelectedValue != BLL.Const._Null)
//{
// UnitWork.ContractId = this.drpContract.SelectedValue;
//}
//else
//{
// UnitWork.ContractId = null;
//}
UnitWork.ContractId = this.txtContractId.Text.Trim();
UnitWork.MainItemCode = this.txtMainItemCode.Text.Trim();
if (!string.IsNullOrEmpty(hdMainItemAndDesignProfessionalIds.Text))
{
@@ -164,7 +165,7 @@ namespace FineUIPro.Web.ProjectData
}
protected void btnMap_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript ( Window2.GetShowReference(String.Format("LocationSelect.aspx?unitWorkId=" + Request.Params["UnitWorkId"])));
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("LocationSelect.aspx?unitWorkId=" + Request.Params["UnitWorkId"])));
}
#region 关闭窗口
/// <summary>
@@ -103,13 +103,13 @@ namespace FineUIPro.Web.ProjectData {
protected global::FineUIPro.DropDownList drpNDEUnit;
/// <summary>
/// drpContract 控件。
/// txtContractId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpContract;
protected global::FineUIPro.TextBox txtContractId;
/// <summary>
/// txtMainItemCode 控件。
@@ -145,7 +145,7 @@ namespace FineUIPro.Web.ProjectData {
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdMainItemAndDesignProfessionalIds;
protected global::FineUIPro.TextBox hdMainItemAndDesignProfessionalIds;
/// <summary>
/// Toolbar1 控件。
@@ -65,7 +65,8 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList runat="server" ID="drpContract" Label="对应合同编号" LabelWidth="150px" Readonly="true"></f:DropDownList>
<%--<f:DropDownList runat="server" ID="drpContract" Label="对应合同编号" LabelWidth="150px" Readonly="true"></f:DropDownList>--%>
<f:TextBox runat="server" ID="txtContractId" Label="对应合同编号" LabelWidth="150px" Readonly="true"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow runat="server">
@@ -10,12 +10,12 @@ namespace FineUIPro.Web.ProjectData
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
//合同编号
this.drpContract.DataTextField = "ContractNum";
this.drpContract.DataValueField = "ContractId";
this.drpContract.DataSource = BLL.PHTGL_ContractReviewService.GetContractReview_CompleteData(this.CurrUser.LoginProjectId);
this.drpContract.DataBind();
Funs.FineUIPleaseSelect(this.drpContract);
////合同编号
//this.drpContract.DataTextField = "ContractNum";
//this.drpContract.DataValueField = "ContractId";
//this.drpContract.DataSource = BLL.PHTGL_ContractReviewService.GetContractReview_CompleteData(this.CurrUser.LoginProjectId);
//this.drpContract.DataBind();
//Funs.FineUIPleaseSelect(this.drpContract);
string UnitWorkId = Request.Params["UnitWorkId"];
if (!string.IsNullOrEmpty(UnitWorkId))
{
@@ -48,9 +48,13 @@ namespace FineUIPro.Web.ProjectData
{
this.txtNDEUnit.Text = UnitService.GetUnitNameByUnitId(UnitWork.NDEUnit);
}
//if (!string.IsNullOrEmpty(UnitWork.ContractId))
//{
// this.drpContract.SelectedValue = UnitWork.ContractId;
//}
if (!string.IsNullOrEmpty(UnitWork.ContractId))
{
this.drpContract.SelectedValue = UnitWork.ContractId;
this.txtContractId.Text = UnitWork.ContractId;
}
this.txtMainItemCode.Text = UnitWork.MainItemCode;
if (!string.IsNullOrEmpty(UnitWork.MainItemAndDesignProfessionalIds))
@@ -103,13 +103,13 @@ namespace FineUIPro.Web.ProjectData {
protected global::FineUIPro.TextBox txtNDEUnit;
/// <summary>
/// drpContract 控件。
/// txtContractId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpContract;
protected global::FineUIPro.TextBox txtContractId;
/// <summary>
/// txtMainItemCode 控件。