提交代码
This commit is contained in:
@@ -30,10 +30,25 @@ namespace FineUIPro.Web.Transfer
|
||||
/// </summary>
|
||||
public void BindGrid()
|
||||
{
|
||||
string strSql = @"select * from Transfer_ProjectSetup C
|
||||
string strSql = @"select * from Transfer_Piping C
|
||||
where C.ProjectId = @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
if (!string.IsNullOrEmpty(this.txtPIPINGLINENUMBER.Text.Trim()))
|
||||
{
|
||||
strSql += " AND PIPINGLINENUMBER like @PIPINGLINENUMBER";
|
||||
listStr.Add(new SqlParameter("@PIPINGLINENUMBER", "%" + this.txtPIPINGLINENUMBER.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
|
||||
{
|
||||
strSql += " AND TestPackageSTART >= @InspectionDateA";
|
||||
listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
|
||||
{
|
||||
strSql += " AND TestPackageSTART <= @InspectionDateZ";
|
||||
listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
@@ -154,10 +169,10 @@ namespace FineUIPro.Web.Transfer
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var data = BLL.ProjectSetupService.GetProjectSetupById(rowID);
|
||||
var data = BLL.PipingService.GetPipingById(rowID);
|
||||
if (data != null)
|
||||
{
|
||||
BLL.ProjectSetupService.DeleteProjectSetup(rowID);
|
||||
BLL.PipingService.DeletePiping(rowID);
|
||||
}
|
||||
}
|
||||
BindGrid();
|
||||
@@ -174,7 +189,7 @@ namespace FineUIPro.Web.Transfer
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("ProjectSetupDataIn.aspx", "导入 - ")));
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PipingDataIn.aspx", "导入 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -190,7 +205,7 @@ namespace FineUIPro.Web.Transfer
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectSetupMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.PipingMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
|
||||
Reference in New Issue
Block a user