20260202 交工资料
This commit is contained in:
commit
e026277f24
|
|
@ -38,3 +38,4 @@ bin-release/
|
|||
/HJGL_DS/FineUIPro.Web/ErrLog.txt
|
||||
/HJGL_DS/Model/packages.config
|
||||
/CreateModel2017.bat
|
||||
*.xls
|
||||
|
|
|
|||
|
|
@ -97,7 +97,24 @@ namespace BLL
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取施工部用户
|
||||
/// 加载入库自编号下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitWarrantybook(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Value";
|
||||
dropName.DataTextField = "Text";
|
||||
dropName.DataSource = GetWarrantybookList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取批号
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
|
|
@ -118,5 +135,29 @@ namespace BLL
|
|||
return lis;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取入库自编号
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetWarrantybookList()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var ls = (from x in db.Weld_StockIn
|
||||
select new
|
||||
{
|
||||
x.Warrantybook,
|
||||
x.HeartNo,
|
||||
}).Distinct().ToList();
|
||||
ListItem[] lis = new ListItem[ls.Count()];
|
||||
for (int i = 0; i < ls.Count(); i++)
|
||||
{
|
||||
lis[i] = new ListItem(ls[i].Warrantybook ?? "", ls[i].HeartNo.ToString());
|
||||
}
|
||||
return lis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<Use64BitIISExpress />
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
|
|
|
|||
|
|
@ -661,6 +661,11 @@
|
|||
materialTypeName = "其它";
|
||||
}
|
||||
}
|
||||
if (queProject[1].Trim().Contains("5G"))
|
||||
{
|
||||
materialType = "FeⅣ,FeⅢ,FeⅡ,FeⅠ,NiⅤ,NiⅣ,NiⅢ,NiⅡ,NiⅠ,Zr3,Zr5,TiⅡ,TiⅠ";
|
||||
materialTypeName = "镍基合金";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -700,6 +705,10 @@
|
|||
{
|
||||
location = "2FG,4FG";
|
||||
}
|
||||
else if (queProject[1].Contains("5G"))
|
||||
{
|
||||
location = "1G,3G,4G,5G";
|
||||
}
|
||||
else
|
||||
{
|
||||
location = queProject[2].Trim();
|
||||
|
|
|
|||
|
|
@ -66,12 +66,12 @@
|
|||
<f:RenderField Width="90px" ColumnID="WeldTypeName" DataField="WeldTypeName" FieldType="String"
|
||||
HeaderText="类型" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="HeartNo" DataField="HeartNo" FieldType="String"
|
||||
HeaderText="批号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="Warrantybook" DataField="Warrantybook" FieldType="String"
|
||||
HeaderText="入库自编号" HeaderTextAlign="Center" TextAlign="Center" SortField="Warrantybook">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="HeartNo" DataField="HeartNo" FieldType="String"
|
||||
HeaderText="批号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:WindowField TextAlign="Center" Width="60px" WindowID="WindowAtt" HeaderText="附件" Text="附件" ToolTip="附件上传查看"
|
||||
DataIFrameUrlFields="QualityCertificateId" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldMat/QualityCertificate&menuId=19FC40C2-4FDC-44DC-A785-85491BACAC6D"
|
||||
HeaderTextAlign="Center" />
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@
|
|||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpHeartNo" runat="server" Label="批号" LabelAlign="Right" AutoPostBack="true" EnableEdit="true"
|
||||
OnSelectedIndexChanged="drpHeartNo_SelectedIndexChanged">
|
||||
<f:DropDownList ID="drpWarrantybook" runat="server" Label="入库自编号" LabelAlign="Right" AutoPostBack="true" EnableEdit="true"
|
||||
OnSelectedIndexChanged="drpWarrantybook_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtWeldType" runat="server" Label="类型" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label runat="server" ID="txtWarrantybook" Label="入库自编号" LabelAlign="Right"></f:Label>
|
||||
<f:Label runat="server" ID="txtHeartNo" Label="批号" LabelAlign="Right"></f:Label>
|
||||
<f:LinkButton ID="UploadAttach2" runat="server" Label="质保书附件" Text="上传和查看" OnClick="btnAttachUrl2_Click"
|
||||
LabelAlign="Right">
|
||||
</f:LinkButton>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
|
|||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.QualityCertificateId = Request.Params["QualityCertificateId"];
|
||||
StockInitService.InitHeartNo(this.drpHeartNo, true);
|
||||
StockInitService.InitHeartNo(this.drpWarrantybook, true);
|
||||
if (!string.IsNullOrEmpty(this.QualityCertificateId))
|
||||
{
|
||||
this.hdQualityCertificateId.Text = this.QualityCertificateId;
|
||||
|
|
@ -60,8 +60,8 @@ namespace FineUIPro.Web.HJGL.MaterialManage
|
|||
}
|
||||
}
|
||||
}
|
||||
this.drpHeartNo.SelectedItem.Text = qc.HeartNo;
|
||||
this.txtWarrantybook.Text = qc.Warrantybook;
|
||||
this.drpWarrantybook.SelectedItem.Text = qc.Warrantybook;
|
||||
this.txtHeartNo.Text = qc.HeartNo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -86,9 +86,9 @@ namespace FineUIPro.Web.HJGL.MaterialManage
|
|||
Alert.ShowInTop("请选择焊材牌号!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpHeartNo.SelectedValue == BLL.Const._Null)
|
||||
if (this.drpWarrantybook.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择批号!", MessageBoxIcon.Warning);
|
||||
Alert.ShowInTop("请选择入库自编号!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(this.hdQualityCertificateId.Text.Trim()))
|
||||
|
|
@ -112,10 +112,9 @@ namespace FineUIPro.Web.HJGL.MaterialManage
|
|||
qc.WeldId = this.hdWeldId.Text.Trim();
|
||||
}
|
||||
|
||||
qc.Warrantybook = this.txtWarrantybook.Text.Trim();
|
||||
qc.Warrantybook = drpWarrantybook.SelectedItem.Text.Trim();
|
||||
//qc.Number = txtNumber.Text.Trim();
|
||||
qc.HeartNo = drpHeartNo.SelectedItem.Text.Trim();
|
||||
qc.Warrantybook = txtWarrantybook.Text.Trim();
|
||||
qc.HeartNo = this.txtHeartNo.Text.Trim();
|
||||
qc.CompileMan = this.CurrUser.UserId;
|
||||
qc.CompileDate = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(this.QualityCertificateId))
|
||||
|
|
@ -204,12 +203,12 @@ namespace FineUIPro.Web.HJGL.MaterialManage
|
|||
|
||||
#endregion
|
||||
|
||||
protected void drpHeartNo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
protected void drpWarrantybook_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.txtWarrantybook.Text = string.Empty;
|
||||
if (this.drpHeartNo.SelectedValue != BLL.Const._Null)
|
||||
this.txtHeartNo.Text = string.Empty;
|
||||
if (this.drpWarrantybook.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
this.txtWarrantybook.Text = this.drpHeartNo.SelectedValue;
|
||||
this.txtHeartNo.Text = this.drpWarrantybook.SelectedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,13 +85,13 @@ namespace FineUIPro.Web.HJGL.MaterialManage {
|
|||
protected global::FineUIPro.TextBox txtWeldSpec;
|
||||
|
||||
/// <summary>
|
||||
/// drpHeartNo 控件。
|
||||
/// drpWarrantybook 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpHeartNo;
|
||||
protected global::FineUIPro.DropDownList drpWarrantybook;
|
||||
|
||||
/// <summary>
|
||||
/// txtWeldType 控件。
|
||||
|
|
@ -103,13 +103,13 @@ namespace FineUIPro.Web.HJGL.MaterialManage {
|
|||
protected global::FineUIPro.TextBox txtWeldType;
|
||||
|
||||
/// <summary>
|
||||
/// txtWarrantybook 控件。
|
||||
/// txtHeartNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtWarrantybook;
|
||||
protected global::FineUIPro.Label txtHeartNo;
|
||||
|
||||
/// <summary>
|
||||
/// UploadAttach2 控件。
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@
|
|||
</f:Button>
|
||||
<f:Button ID="btnBatchAdd" Text="批量增加" Icon="TableAdd" runat="server" OnClick="btnBatchAdd_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnBatchDel" Text="批量删除" Icon="Delete" runat="server" OnClick="btnBatchDel_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" runat="server" Text="导出" Icon="FolderUp" OnClick="btnOut_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnFileName" Text="文档名" Icon="TableEdit" runat="server" OnClick="btnFileName_Click">
|
||||
|
|
@ -156,12 +158,14 @@
|
|||
runat="server" BoxFlex="1" DataKeyNames="JOT_ID" AllowCellEditing="true" AllowColumnLocking="true"
|
||||
EnableColumnLines="true" ClicksToEdit="2" DataIDField="JOT_ID" AllowSorting="true"
|
||||
SortField="JOTY_Group,Sort1,Sort2,Sort3,Sort4,Sort5" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableTextSelection="True" AutoScroll="true" EnableRowDoubleClickEvent="true"
|
||||
IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange" OnRowCommand="Grid1_RowCommand"
|
||||
EnableTextSelection="True" AutoScroll="true" EnableRowDoubleClickEvent="true" EnableCheckBoxSelect="true" KeepCurrentSelection="true"
|
||||
OnRowDoubleClick="Grid1_RowDoubleClick" OnRowDataBound="Grid1_RowDataBound">
|
||||
<Columns>
|
||||
<%--<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />--%>
|
||||
<%--<f:CheckBoxField ColumnID="ckbIsSelected" Width="60px" RenderAsStaticField="false"
|
||||
AutoPostBack="true" CommandName="IsSelected" HeaderText="选择" HeaderTextAlign="Center" />--%>
|
||||
<f:WindowField ColumnID="JOT_JointNo" HeaderTextAlign="Center" TextAlign="Left" Width="100px"
|
||||
WindowID="Window1" HeaderText="焊口代号" DataTextField="JOT_JointNo" DataIFrameUrlFields="JOT_ID"
|
||||
DataIFrameUrlFormatString="JointInfoEdit.aspx?JOT_ID={0}" Title="焊口代号" ToolTip="着色表示该焊口已热处理或所在批已封,不能删除和修改!"
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
public partial class JointInfo : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 定义集合
|
||||
/// </summary>
|
||||
private static List<string> list = new List<string>();
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
|
|
@ -492,13 +497,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
isShow = false;
|
||||
}
|
||||
bool isDelete = false;
|
||||
string err = string.Empty;
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
if (judgementDelete(rowID, isShow))
|
||||
string content = judgementDelete(rowID, isShow);
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{
|
||||
isDelete = true;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var hotProessTrustItem = db.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == rowID);
|
||||
if (hotProessTrustItem != null)
|
||||
|
|
@ -520,11 +525,19 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID);
|
||||
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除焊口信息");
|
||||
}
|
||||
else
|
||||
{
|
||||
err += content;
|
||||
}
|
||||
}
|
||||
if (isDelete)
|
||||
if (string.IsNullOrEmpty(err))
|
||||
{
|
||||
Alert.ShowInTop("删除成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop(err, MessageBoxIcon.Warning);
|
||||
}
|
||||
this.BindGrid();
|
||||
}
|
||||
else
|
||||
|
|
@ -1065,7 +1078,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
/// 判断是否可以删除
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private bool judgementDelete(string id, bool isShow)
|
||||
private string judgementDelete(string id, bool isShow)
|
||||
{
|
||||
string content = string.Empty;
|
||||
//if (BLL.Funs.DB.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == id) != null
|
||||
|
|
@ -1076,7 +1089,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
var joint = BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(id);
|
||||
if (!string.IsNullOrEmpty(joint.DReportID))
|
||||
{
|
||||
content = "该焊口已提交焊接记录,不能删除!";
|
||||
content = "焊口"+joint.JOT_JointNo+"已提交焊接记录,不能删除!";
|
||||
}
|
||||
var batchDetail = BLL.HJGL_BO_BatchDetailService.GetBatchDetailByJotId(id);
|
||||
if (batchDetail != null)
|
||||
|
|
@ -1084,22 +1097,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
var batch = BLL.HJGL_BO_BatchService.GetBatchById(batchDetail.BatchId);
|
||||
if (batch.BatchIsClosed == true)
|
||||
{
|
||||
content = "该焊口所在批已关闭,不能删除!";
|
||||
content = "焊口"+ joint.JOT_JointNo + "所在批已关闭,不能删除!";
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isShow)
|
||||
{
|
||||
Alert.ShowInTop(content, MessageBoxIcon.Error);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return content;
|
||||
//if (string.IsNullOrEmpty(content))
|
||||
//{
|
||||
// return true;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// if (isShow)
|
||||
// {
|
||||
// Alert.ShowInTop(content, MessageBoxIcon.Error);
|
||||
// }
|
||||
// return false;
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
@ -1274,5 +1287,104 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#region Grid行点击事件
|
||||
/// <summary>
|
||||
/// Grid1行点击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[e.RowIndex][0].ToString();
|
||||
if (e.CommandName == "IsSelected")
|
||||
{
|
||||
CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected");
|
||||
if (checkField.GetCheckedState(e.RowIndex))
|
||||
{
|
||||
if (!list.Contains(rowID))
|
||||
{
|
||||
list.Add(rowID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (list.Contains(rowID))
|
||||
{
|
||||
list.Remove(rowID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 批量增加焊口信息
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnBatchDel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnDelete))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
bool isShow = true;
|
||||
if (Grid1.SelectedRowIndexArray.Length > 1)
|
||||
{
|
||||
isShow = false;
|
||||
}
|
||||
string err = string.Empty;
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
string content = judgementDelete(rowID, isShow);
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var hotProessTrustItem = db.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == rowID);
|
||||
if (hotProessTrustItem != null)
|
||||
{
|
||||
db.HJGL_CH_HotProessTrustItem.DeleteOnSubmit(hotProessTrustItem);
|
||||
}
|
||||
var hotProessItem = db.HJGL_HotProessItem.FirstOrDefault(x => x.JOT_ID == rowID);
|
||||
if (hotProessItem != null)
|
||||
{
|
||||
db.HJGL_HotProessItem.DeleteOnSubmit(hotProessItem);
|
||||
}
|
||||
var hotProessResult = db.HJGL_CH_HotProessResult.FirstOrDefault(x => x.JOT_ID == rowID);
|
||||
if (hotProessResult != null)
|
||||
{
|
||||
db.HJGL_CH_HotProessResult.DeleteOnSubmit(hotProessResult);
|
||||
}
|
||||
db.SubmitChanges();
|
||||
BLL.HJGL_BO_BatchDetailService.DeleteBatchDetail(rowID); //删除批明细
|
||||
BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID);
|
||||
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除焊口信息");
|
||||
}
|
||||
else
|
||||
{
|
||||
err += content;
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(err))
|
||||
{
|
||||
Alert.ShowInTop("删除成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop(err, MessageBoxIcon.Warning);
|
||||
}
|
||||
this.BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -174,6 +174,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnBatchAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnBatchDel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnBatchDel;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -57,69 +57,72 @@ namespace FineUIPro.Web
|
|||
string password = this.tbxPassword.Text;
|
||||
bool rememberMe = this.savemessgae.Checked;
|
||||
bool isLogin = false;
|
||||
var sysUser = Funs.DB.Sys_User.FirstOrDefault(x => x.Account == userName && x.IsPost == true);
|
||||
if (sysUser != null)
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
if (sysUser.LockTime.HasValue && sysUser.LockTime.Value > DateTime.Now)
|
||||
var sysUser = db.Sys_User.FirstOrDefault(x => x.Account == userName && x.IsPost == true);
|
||||
if (sysUser != null)
|
||||
{
|
||||
Alert.Show("账号锁定30分钟!", MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sysUser.Password.ToUpper() != Sys_UserService.EncryptionPassword(password).ToUpper())
|
||||
if (sysUser.LockTime.HasValue && sysUser.LockTime.Value > DateTime.Now)
|
||||
{
|
||||
if (sysUser.LockTime.HasValue && sysUser.LockTime.Value < DateTime.Now)
|
||||
{
|
||||
sysUser.ErrorTimes = null;
|
||||
sysUser.LockTime = null;
|
||||
Sys_UserService.UpdateUser(sysUser);
|
||||
}
|
||||
if (sysUser.ErrorTimes.HasValue && sysUser.ErrorTimes.Value >= 4)
|
||||
{
|
||||
sysUser.ErrorTimes = sysUser.ErrorTimes.Value + 1;
|
||||
sysUser.LockTime = DateTime.Now.AddMinutes(30);
|
||||
Sys_UserService.UpdateUser(sysUser);
|
||||
Alert.Show("账号锁定30分钟!", MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
else if (sysUser.ErrorTimes.HasValue)
|
||||
{
|
||||
sysUser.ErrorTimes = sysUser.ErrorTimes.Value + 1;
|
||||
Sys_UserService.UpdateUser(sysUser);
|
||||
// error = "密码错误" + sysUser.ErrorTimes + "次,超过5次将锁定10分钟!";
|
||||
Alert.Show("用户名或密码错误,超过5次将锁定30分钟,请重新输入!", MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
sysUser.ErrorTimes = 1;
|
||||
Sys_UserService.UpdateUser(sysUser);
|
||||
Alert.Show("用户名或密码错误,超过5次将锁定30分钟,请重新输入!", MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
///登陆信息是否正确
|
||||
if (BLL.Sys_UserService.UserLogOn(userName, password, rememberMe, this.Page))
|
||||
{
|
||||
isLogin = true;
|
||||
}
|
||||
if (isLogin)
|
||||
{
|
||||
BLL.Sys_LogService.AddLog(Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "登陆成功!");
|
||||
Response.Redirect("~/default.aspx");
|
||||
Alert.Show("账号锁定30分钟!", MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.Show("账户与密码不匹配!", MessageBoxIcon.Error);
|
||||
return;
|
||||
if (sysUser.Password.ToUpper() != Sys_UserService.EncryptionPassword(password).ToUpper())
|
||||
{
|
||||
if (sysUser.LockTime.HasValue && sysUser.LockTime.Value < DateTime.Now)
|
||||
{
|
||||
sysUser.ErrorTimes = null;
|
||||
sysUser.LockTime = null;
|
||||
Sys_UserService.UpdateUser(sysUser);
|
||||
}
|
||||
if (sysUser.ErrorTimes.HasValue && sysUser.ErrorTimes.Value >= 4)
|
||||
{
|
||||
sysUser.ErrorTimes = sysUser.ErrorTimes.Value + 1;
|
||||
sysUser.LockTime = DateTime.Now.AddMinutes(30);
|
||||
Sys_UserService.UpdateUser(sysUser);
|
||||
Alert.Show("账号锁定30分钟!", MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
else if (sysUser.ErrorTimes.HasValue)
|
||||
{
|
||||
sysUser.ErrorTimes = sysUser.ErrorTimes.Value + 1;
|
||||
Sys_UserService.UpdateUser(sysUser);
|
||||
// error = "密码错误" + sysUser.ErrorTimes + "次,超过5次将锁定10分钟!";
|
||||
Alert.Show("用户名或密码错误,超过5次将锁定30分钟,请重新输入!", MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
sysUser.ErrorTimes = 1;
|
||||
Sys_UserService.UpdateUser(sysUser);
|
||||
Alert.Show("用户名或密码错误,超过5次将锁定30分钟,请重新输入!", MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
///登陆信息是否正确
|
||||
if (BLL.Sys_UserService.UserLogOn(userName, password, rememberMe, this.Page))
|
||||
{
|
||||
isLogin = true;
|
||||
}
|
||||
if (isLogin)
|
||||
{
|
||||
BLL.Sys_LogService.AddLog(Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "登陆成功!");
|
||||
Response.Redirect("~/default.aspx");
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.Show("账户与密码不匹配!", MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.Show("用户名或密码错误,请重新输入!", MessageBoxIcon.Error);
|
||||
return;
|
||||
else
|
||||
{
|
||||
Alert.Show("用户名或密码错误,请重新输入!", MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -552,6 +552,11 @@ namespace FineUIPro.Web.Welder
|
|||
materialTypeName = "其它";
|
||||
}
|
||||
}
|
||||
if (queProject[1].Trim().Contains("5G"))
|
||||
{
|
||||
materialType = "FeⅣ,FeⅢ,FeⅡ,FeⅠ,NiⅤ,NiⅣ,NiⅢ,NiⅡ,NiⅠ,Zr3,Zr5,TiⅡ,TiⅠ";
|
||||
materialTypeName = "镍基合金";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -591,6 +596,10 @@ namespace FineUIPro.Web.Welder
|
|||
{
|
||||
location = "2FG,4FG";
|
||||
}
|
||||
else if (queProject[1].Contains("5G"))
|
||||
{
|
||||
location = "1G,3G,4G,5G";
|
||||
}
|
||||
else
|
||||
{
|
||||
location = queProject[2];
|
||||
|
|
@ -861,6 +870,11 @@ namespace FineUIPro.Web.Welder
|
|||
materialTypeName = "其它";
|
||||
}
|
||||
}
|
||||
if (queProject[1].Trim().Contains("5G"))
|
||||
{
|
||||
materialType = "FeⅣ,FeⅢ,FeⅡ,FeⅠ,NiⅤ,NiⅣ,NiⅢ,NiⅡ,NiⅠ,Zr3,Zr5,TiⅡ,TiⅠ";
|
||||
materialTypeName = "镍基合金";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -900,6 +914,10 @@ namespace FineUIPro.Web.Welder
|
|||
{
|
||||
location = "2FG,4FG";
|
||||
}
|
||||
else if (queProject[1].Contains("5G"))
|
||||
{
|
||||
location = "1G,3G,4G,5G";
|
||||
}
|
||||
else
|
||||
{
|
||||
location = queProject[2];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<Use64BitIISExpress />
|
||||
|
|
|
|||
Loading…
Reference in New Issue