提交代码

This commit is contained in:
2024-01-26 15:19:11 +08:00
parent 0e2aa3bb4c
commit a39dd15a70
17 changed files with 1767 additions and 91 deletions
@@ -30,11 +30,7 @@ namespace FineUIPro.Web.Transfer
/// </summary>
public void BindGrid()
{
string strSql = @"select InspectionEquipmentId,ProjectId,C.UnitId,Status, U.UnitName,InspectionCode,CN.ProfessionalName,InspectionName,Specifications,Unit,
Supplier,Counts,SamplingCount,(CASE WHEN SamplingResult=1 THEN '合格' WHEN SamplingResult=0 THEN '不合格' ELSE '' END) AS SamplingResult,
InspectionDate,AttachUrl,Attribute,RemarkCode,UsedPlace,EquipmentNO from Comprehensive_InspectionEquipment C
left join Base_Unit U on C.UnitId=U.UnitId
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
string strSql = @"select * from Transfer_ProjectSetup C
where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
@@ -158,10 +154,10 @@ namespace FineUIPro.Web.Transfer
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var InspectionEquipment = BLL.InspectionEquipmentService.GetInspectionEquipmentById(rowID);
if (InspectionEquipment != null)
var data = BLL.ProjectSetupService.GetProjectSetupById(rowID);
if (data != null)
{
BLL.InspectionEquipmentService.DeleteInspectionEquipment(rowID);
BLL.ProjectSetupService.DeleteProjectSetup(rowID);
}
}
BindGrid();
@@ -178,7 +174,7 @@ namespace FineUIPro.Web.Transfer
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("InspectionEquipmentDataIn.aspx", "导入 - ")));
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("ProjectSetupDataIn.aspx", "导入 - ")));
}
#endregion
@@ -194,7 +190,7 @@ namespace FineUIPro.Web.Transfer
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.InspectionEquipmentMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectSetupMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnDelete))
@@ -208,33 +204,5 @@ namespace FineUIPro.Web.Transfer
}
}
#endregion
public static string ConvertState(object Status)
{
if (Status != null)
{
if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile)
{
return "重报";
}
else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect)
{
return "驳回";
}
else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile)
{
return "编制";
}
else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit)
{
return "待审批";
}
else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete)
{
return "审批完成";
}
}
return "编制";
}
}
}