焊工 入场 离场 日报导入 装置排序
This commit is contained in:
parent
2e0c97e981
commit
bead4c1d76
|
@ -0,0 +1,3 @@
|
|||
Alter TABLE [dbo].[BS_Welder]
|
||||
add [InTime] [datetime] NULL,
|
||||
[OutTime] [datetime] NULL
|
|
@ -1,4 +1,5 @@
|
|||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
@ -74,7 +75,8 @@ namespace BLL
|
|||
newWelder.AttachUrl = welder.AttachUrl;
|
||||
newWelder.JOT_Sch = welder.JOT_Sch;
|
||||
newWelder.Steels = welder.Steels;
|
||||
|
||||
newWelder.InTime = welder.InTime;
|
||||
newWelder.OutTime = welder.OutTime;
|
||||
|
||||
Funs.DB.BS_Welder.InsertOnSubmit(newWelder);
|
||||
Funs.DB.SubmitChanges();
|
||||
|
@ -108,6 +110,8 @@ namespace BLL
|
|||
newWelder.SE_EquipmentID = welder.SE_EquipmentID;
|
||||
newWelder.WederType = welder.WederType;
|
||||
newWelder.WED_TYPE = welder.WED_TYPE;
|
||||
newWelder.InTime = welder.InTime;
|
||||
newWelder.OutTime = welder.OutTime;
|
||||
|
||||
newWelder.RTIdentityCard = welder.RTIdentityCard;
|
||||
newWelder.RTQualifiedLevel = welder.RTQualifiedLevel;
|
||||
|
@ -297,6 +301,7 @@ namespace BLL
|
|||
{
|
||||
var q = from x in Funs.DB.BS_Welder
|
||||
where x.ProjectId == projectId && x.WED_Unit == unitId && x.WED_IfOnGuard == true
|
||||
where !x.OutTime.HasValue || x.OutTime>DateTime.Now
|
||||
orderby x.WED_Code
|
||||
select new
|
||||
{
|
||||
|
|
|
@ -99,6 +99,7 @@ namespace BLL
|
|||
newIns.Weights = installation.Weights;
|
||||
newIns.WeightsMoney = installation.WeightsMoney;
|
||||
newIns.Def = installation.Def;
|
||||
newIns.SortIndex = installation.SortIndex;
|
||||
|
||||
db.Project_Installation.InsertOnSubmit(newIns);
|
||||
db.SubmitChanges();
|
||||
|
|
|
@ -81,16 +81,13 @@
|
|||
<f:RenderField Width="100px" ColumnID="WED_Birthday" DataField="WED_Birthday" FieldType="Date"
|
||||
HeaderText="出生日期" HeaderTextAlign="Center" TextAlign="Left" Renderer="Date">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="InTime" Width="100px" HeaderText="入场时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbInTime" runat="server" Text='<%# ConvertInTime(Eval("IdentityCard")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField ColumnID="OutTime" Width="100px" HeaderText="出场时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbOutTime" runat="server" Text='<%# ConvertOutTime(Eval("IdentityCard")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="100px" ColumnID="InTime" DataField="InTime" FieldType="Date"
|
||||
HeaderText="入场时间" HeaderTextAlign="Center" TextAlign="Left" Renderer="Date">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="OutTime" DataField="OutTime" FieldType="Date"
|
||||
HeaderText="出场时间" HeaderTextAlign="Center" TextAlign="Left" Renderer="Date">
|
||||
</f:RenderField>
|
||||
|
||||
<f:TemplateField ColumnID="Qualification" Width="100px" HeaderText="资质" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbQualification" runat="server" Text='<%# ConvertQualification(Eval("WED_ID")) %>'></asp:Label>
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
|||
Welder.IdentityCard,
|
||||
Welder.TeamGroupId,
|
||||
Welder.WED_Code,
|
||||
Welder.WED_Name,
|
||||
Welder.WED_Name, Welder.InTime, Welder.OutTime,
|
||||
(CASE WHEN Welder.WED_Sex='2' THEN '女' ELSE '男' END ) AS WED_Sex,
|
||||
Welder.WED_Birthday,
|
||||
Welder.WED_WorkCode,
|
||||
|
|
|
@ -185,24 +185,6 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label labNumber;
|
||||
|
||||
/// <summary>
|
||||
/// lbInTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbInTime;
|
||||
|
||||
/// <summary>
|
||||
/// lbOutTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbOutTime;
|
||||
|
||||
/// <summary>
|
||||
/// lbQualification 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -52,6 +52,13 @@
|
|||
</f:RadioButtonList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="txtTimeIn" runat="server" Label="入场时间" LabelAlign="Right" LabelWidth="120px"></f:DatePicker>
|
||||
<f:DatePicker ID="txtTimeOut" runat="server" Label="出场时间" LabelAlign="Right" LabelWidth="120px"></f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtWorkCode" runat="server" Label="上岗证号"
|
||||
|
|
|
@ -77,6 +77,8 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
|||
this.txtWED_Name.Text = welder.WED_Name;
|
||||
this.txtWED_Code.Text = welder.WED_Code;
|
||||
this.txtBirthday.Text = welder.WED_Birthday.HasValue ? string.Format("{0:yyyy-MM-dd}", welder.WED_Birthday) : "";
|
||||
this.txtTimeIn.Text = welder.InTime.HasValue ? string.Format("{0:yyyy-MM-dd}", welder.InTime) : "";
|
||||
this.txtTimeOut.Text = welder.OutTime.HasValue ? string.Format("{0:yyyy-MM-dd}", welder.OutTime) : "";
|
||||
if (!string.IsNullOrEmpty(welder.WED_TYPE))
|
||||
{
|
||||
this.rbtype.SelectedValue = welder.WED_TYPE;
|
||||
|
@ -116,6 +118,10 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
|||
this.drpSteType.Values = welder.Steels.Split(',');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -184,6 +190,14 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
|||
welder.WED_TYPE = this.rbtype.SelectedValue;
|
||||
welder.WED_Birthday = Funs.GetNewDateTime(this.txtBirthday.Text.Trim());
|
||||
welder.LimitDate = Funs.GetNewDateTime(this.txtLimitDate.Text.Trim());
|
||||
if (!string.IsNullOrEmpty(txtTimeIn.Text))
|
||||
{
|
||||
welder.InTime = Funs.GetNewDateTime(this.txtTimeIn.Text.Trim());
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtTimeOut.Text))
|
||||
{
|
||||
welder.OutTime = Funs.GetNewDateTime(this.txtTimeOut.Text.Trim());
|
||||
}
|
||||
welder.WED_WorkCode = this.txtWorkCode.Text.Trim();
|
||||
welder.WED_Class = this.txtClass.Text.Trim();
|
||||
if (this.cbIfOnGuard.Checked)
|
||||
|
@ -232,6 +246,8 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
|||
}
|
||||
}
|
||||
BLL.WelderService.UpdateBSWelder(welder);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -260,6 +276,8 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
|||
person.PersonId = welder.WED_ID;
|
||||
person.IdentityCard = welder.IdentityCard;
|
||||
person.PhotoUrl = welder.AttachUrl;
|
||||
|
||||
|
||||
///上传人脸库
|
||||
if (!string.IsNullOrEmpty(person.PhotoUrl))
|
||||
{
|
||||
|
@ -296,6 +314,9 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
|
|
@ -95,6 +95,24 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rblSex;
|
||||
|
||||
/// <summary>
|
||||
/// txtTimeIn 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtTimeIn;
|
||||
|
||||
/// <summary>
|
||||
/// txtTimeOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtTimeOut;
|
||||
|
||||
/// <summary>
|
||||
/// txtWorkCode 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -429,6 +429,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
var welder = welders.Where(x => x.WED_Unit == unit.UnitId && x.TeamGroupId == teamGroup.TeamGroupId && x.WED_Code == row15.Trim()).FirstOrDefault();
|
||||
if (welder != null)
|
||||
{
|
||||
if(welder.OutTime.HasValue && welder.OutTime.Value < DateTime.Now)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "盖面焊工" + "," + "已经出场!" + "|";
|
||||
}
|
||||
if (!welder.WED_IfOnGuard.HasValue || welder.WED_IfOnGuard.HasValue && !welder.WED_IfOnGuard.Value)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "盖面焊工" + "," + "不在岗!" + "|";
|
||||
}
|
||||
var steel = steels.Where(x => x.MaterialCode == row4.Trim()).FirstOrDefault();
|
||||
if (steel != null && !string.IsNullOrEmpty(steel.SteelType) && !string.IsNullOrEmpty(welder.Steels) && !welder.Steels.Contains(steel.SteelType))
|
||||
{
|
||||
|
@ -484,6 +492,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
result += (i + 2).ToString() + "," + "打底焊工代号" + "," + "该单位没有此焊工代号!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (welder.OutTime.HasValue && welder.OutTime.Value < DateTime.Now)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "打底焊工" + "," + "已经出场!" + "|";
|
||||
}
|
||||
if (!welder.WED_IfOnGuard.HasValue || (welder.WED_IfOnGuard.HasValue && !welder.WED_IfOnGuard.Value))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "打底焊工" + "," + "不在岗!" + "|";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -493,6 +512,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
result += (i + 2).ToString() + "," + "打底焊工代号" + "," + "该单位没有此焊工代号!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (welder.OutTime.HasValue && welder.OutTime.Value < DateTime.Now)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "打底焊工" + "," + "已经出场!" + "|";
|
||||
}
|
||||
if (!welder.WED_IfOnGuard.HasValue || (welder.WED_IfOnGuard.HasValue && !welder.WED_IfOnGuard.Value))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "打底焊工" + "," + "不在岗!" + "|";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -534,7 +534,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
|
||||
//if (!string.IsNullOrEmpty(this.drpUnit.SelectedValue) && this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.UnitId) && this.drpInstallation.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpInstallation.SelectedValue))
|
||||
// if (!string.IsNullOrEmpty(this.CurrUser.UnitId) && this.drpInstallation.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpInstallation.SelectedValue))
|
||||
if ( this.drpInstallation.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpInstallation.SelectedValue))
|
||||
{
|
||||
string strList = this.CurrUser.LoginProjectId + "|" + this.drpUnit.SelectedValue + "|" + this.DReportID + "|" + this.drpInstallation.SelectedValue;
|
||||
string window = String.Format("WeldReportItemEdit.aspx?strList={0}&jotIds={1}", strList, jotIds, "编辑 - ");
|
||||
|
|
|
@ -115,6 +115,12 @@
|
|||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true" Icon="Pencil" Hidden="true"
|
||||
runat="server" Text="修改">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuUp" OnClick="btnMenuUp_Click" EnablePostBack="true" Icon="Pencil"
|
||||
runat="server" Text="上移">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDown" OnClick="btnMenuDown_Click" EnablePostBack="true" Icon="Pencil"
|
||||
runat="server" Text="下移">
|
||||
</f:MenuButton>
|
||||
<%-- <f:MenuButton ID="btnMenuCopy" OnClick="btnMenuCopy_Click" EnablePostBack="true"
|
||||
runat="server" Text="拷贝" >
|
||||
</f:MenuButton>--%>
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace FineUIPro.Web.ProjectData
|
|||
{
|
||||
var installations = from x in Funs.DB.Project_Installation
|
||||
where x.ProjectId == e.Node.NodeID && x.SuperInstallationId == "0"
|
||||
orderby x.InstallationCode
|
||||
orderby x.SortIndex ascending
|
||||
select x;
|
||||
foreach (var installation in installations)
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ namespace FineUIPro.Web.ProjectData
|
|||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
var installation2s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation.InstallationId orderby x.InstallationCode select x;
|
||||
var installation2s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation.InstallationId orderby x.SortIndex ascending select x;
|
||||
if (installation2s.Count() > 0)
|
||||
{
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
|
@ -130,7 +130,7 @@ namespace FineUIPro.Web.ProjectData
|
|||
{
|
||||
var installations = from x in Funs.DB.Project_Installation
|
||||
where x.SuperInstallationId == e.Node.NodeID
|
||||
orderby x.InstallationCode
|
||||
orderby x.SortIndex ascending
|
||||
select x;
|
||||
foreach (var installation in installations)
|
||||
{
|
||||
|
@ -141,7 +141,7 @@ namespace FineUIPro.Web.ProjectData
|
|||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
var installation3s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation.InstallationId orderby x.InstallationCode select x;
|
||||
var installation3s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation.InstallationId orderby x.SortIndex ascending select x;
|
||||
if (installation3s.Count() > 0)
|
||||
{
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
|
@ -296,8 +296,193 @@ namespace FineUIPro.Web.ProjectData
|
|||
ShowNotify("请选择树节点!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
protected void btnMenuUp_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.trProjects.SelectedNode != null)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectInstallationMenuId, BLL.Const.BtnAdd))
|
||||
{
|
||||
|
||||
|
||||
var install = Funs.DB.Project_Installation.FirstOrDefault(x => x.InstallationId == this.trProjects.SelectedNode.NodeID);
|
||||
var installs = Funs.DB.Project_Installation.Where(x => x.ProjectId == install.ProjectId && x.SuperInstallationId == install.SuperInstallationId).OrderBy(x => x.SortIndex).ToList();
|
||||
|
||||
if (!install.SortIndex.HasValue)
|
||||
{
|
||||
int index = 1;
|
||||
foreach (var i in installs)
|
||||
{
|
||||
i.SortIndex = index;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
for (int index = 1; index < installs.Count; index++)
|
||||
{
|
||||
if (installs[index].InstallationId == this.trProjects.SelectedNode.NodeID)
|
||||
{
|
||||
|
||||
int tempIndex = installs[index].SortIndex.Value;
|
||||
installs[index].SortIndex = installs[index - 1].SortIndex;
|
||||
installs[index - 1].SortIndex = tempIndex;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Funs.DB.SubmitChanges();
|
||||
|
||||
var parent = this.trProjects.SelectedNode.ParentNode;
|
||||
parent.Nodes.Clear();
|
||||
|
||||
if (parent.CommandName == "project")
|
||||
{
|
||||
var installations = from x in Funs.DB.Project_Installation where x.ProjectId == parent.NodeID && x.SuperInstallationId == "0" orderby x.SortIndex ascending select x;
|
||||
foreach (var installation in installations)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = installation.InstallationName;
|
||||
newNode.NodeID = installation.InstallationId;
|
||||
newNode.CommandName = "installation";
|
||||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableClickEvent = true;
|
||||
parent.Nodes.Add(newNode);
|
||||
var installation3s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation.InstallationId orderby x.SortIndex ascending select x;
|
||||
if (installation3s.Count() > 0)
|
||||
{
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
emptyNode.Text = "";
|
||||
emptyNode.NodeID = "";
|
||||
newNode.Nodes.Add(emptyNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var installations = from x in Funs.DB.Project_Installation where x.SuperInstallationId == parent.NodeID orderby x.SortIndex ascending select x;
|
||||
foreach (var installation in installations)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = installation.InstallationName;
|
||||
newNode.NodeID = installation.InstallationId;
|
||||
newNode.CommandName = "installation";
|
||||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableClickEvent = true;
|
||||
parent.Nodes.Add(newNode);
|
||||
var installation3s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation.InstallationId orderby x.SortIndex ascending select x;
|
||||
if (installation3s.Count() > 0)
|
||||
{
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
emptyNode.Text = "";
|
||||
emptyNode.NodeID = "";
|
||||
newNode.Nodes.Add(emptyNode);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择树节点!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
protected void btnMenuDown_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.trProjects.SelectedNode != null)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectInstallationMenuId, BLL.Const.BtnAdd))
|
||||
{
|
||||
|
||||
var install = Funs.DB.Project_Installation.FirstOrDefault(x => x.InstallationId == this.trProjects.SelectedNode.NodeID);
|
||||
var installs = Funs.DB.Project_Installation.Where(x =>x.ProjectId==install.ProjectId && x.SuperInstallationId == install.SuperInstallationId).OrderBy(x => x.SortIndex).ToList();
|
||||
|
||||
if (!install.SortIndex.HasValue)
|
||||
{
|
||||
int index = 1;
|
||||
foreach (var i in installs)
|
||||
{
|
||||
i.SortIndex = index;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
for (int index = 0; index < installs.Count - 1; index++)
|
||||
{
|
||||
if (installs[index].InstallationId == this.trProjects.SelectedNode.NodeID)
|
||||
{
|
||||
|
||||
int tempIndex = installs[index].SortIndex.Value;
|
||||
installs[index].SortIndex = installs[index + 1].SortIndex;
|
||||
installs[index + 1].SortIndex = tempIndex;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Funs.DB.SubmitChanges();
|
||||
var parent = this.trProjects.SelectedNode.ParentNode;
|
||||
parent.Nodes.Clear();
|
||||
if (parent.CommandName == "project")
|
||||
{
|
||||
var installations = from x in Funs.DB.Project_Installation where x.ProjectId == parent.NodeID && x.SuperInstallationId == "0" orderby x.SortIndex ascending select x;
|
||||
foreach (var installation in installations)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = installation.InstallationName;
|
||||
newNode.NodeID = installation.InstallationId;
|
||||
newNode.CommandName = "installation";
|
||||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableClickEvent = true;
|
||||
parent.Nodes.Add(newNode);
|
||||
var installation3s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation.InstallationId orderby x.SortIndex ascending select x;
|
||||
if (installation3s.Count() > 0)
|
||||
{
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
emptyNode.Text = "";
|
||||
emptyNode.NodeID = "";
|
||||
newNode.Nodes.Add(emptyNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var installations = from x in Funs.DB.Project_Installation where x.SuperInstallationId == parent.NodeID orderby x.SortIndex ascending select x;
|
||||
foreach (var installation in installations)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = installation.InstallationName;
|
||||
newNode.NodeID = installation.InstallationId;
|
||||
newNode.CommandName = "installation";
|
||||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableClickEvent = true;
|
||||
parent.Nodes.Add(newNode);
|
||||
var installation3s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation.InstallationId orderby x.SortIndex ascending select x;
|
||||
if (installation3s.Count() > 0)
|
||||
{
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
emptyNode.Text = "";
|
||||
emptyNode.NodeID = "";
|
||||
newNode.Nodes.Add(emptyNode);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择树节点!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
|
|
|
@ -221,6 +221,24 @@ namespace FineUIPro.Web.ProjectData
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuUp 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuUp;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDown 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDown;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<%--<f:NumberBox ID="txtWeights" NoDecimal="false" NoNegative="true" MaxValue="100" Label="权重占比(%)" LabelWidth="130px"
|
||||
<f:NumberBox ID="txtSortIndex" NoDecimal="true" NoNegative="true" Label="显示顺序" LabelWidth="130px"
|
||||
MinValue="0" runat="server" Required="true" >
|
||||
</f:NumberBox>--%>
|
||||
</f:NumberBox>
|
||||
<f:TextBox ID="txtRemark" runat="server" Label="备注" LabelWidth="140px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
|
|
@ -63,6 +63,7 @@ namespace FineUIPro.Web.ProjectData
|
|||
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", installation1.EndDate);
|
||||
}
|
||||
this.txtRemark.Text = installation1.Def;
|
||||
this.txtSortIndex.Text = installation1.SortIndex.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -103,6 +104,11 @@ namespace FineUIPro.Web.ProjectData
|
|||
installation.EndDate = Convert.ToDateTime(txtEndDate.Text.Trim());
|
||||
}
|
||||
installation.Def = txtRemark.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(txtSortIndex.Text.Trim()))
|
||||
{
|
||||
installation.SortIndex = int.Parse(txtSortIndex.Text.Trim());
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
installation.InstallationId = SQLHelper.GetNewID(typeof(Model.Project_Installation));
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.ProjectData {
|
||||
namespace FineUIPro.Web.ProjectData
|
||||
{
|
||||
|
||||
|
||||
public partial class InstallationSave {
|
||||
public partial class InstallationSave
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
|
@ -75,6 +77,15 @@ namespace FineUIPro.Web.ProjectData {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtEndDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtSortIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtSortIndex;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -52113,6 +52113,10 @@ namespace Model
|
|||
|
||||
private string _Steels;
|
||||
|
||||
private System.Nullable<System.DateTime> _InTime;
|
||||
|
||||
private System.Nullable<System.DateTime> _OutTime;
|
||||
|
||||
private EntityRef<Base_Unit> _Base_Unit;
|
||||
|
||||
private EntityRef<BS_Welder> _WED_;
|
||||
|
@ -52259,6 +52263,10 @@ namespace Model
|
|||
partial void OnJOT_SchChanged();
|
||||
partial void OnSteelsChanging(string value);
|
||||
partial void OnSteelsChanged();
|
||||
partial void OnInTimeChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnInTimeChanged();
|
||||
partial void OnOutTimeChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnOutTimeChanged();
|
||||
#endregion
|
||||
|
||||
public BS_Welder()
|
||||
|
@ -53466,6 +53474,46 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InTime", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> InTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._InTime;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._InTime != value))
|
||||
{
|
||||
this.OnInTimeChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._InTime = value;
|
||||
this.SendPropertyChanged("InTime");
|
||||
this.OnInTimeChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OutTime", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> OutTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._OutTime;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._OutTime != value))
|
||||
{
|
||||
this.OnOutTimeChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._OutTime = value;
|
||||
this.SendPropertyChanged("OutTime");
|
||||
this.OnOutTimeChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_BS_Welder_Base_Unit", Storage="_Base_Unit", ThisKey="WED_Unit", OtherKey="UnitId", IsForeignKey=true)]
|
||||
public Base_Unit Base_Unit
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue