2022-12-14 11:38:29 +08:00
|
|
|
|
using BLL;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Data;
|
|
|
|
|
|
using System.Data.SqlClient;
|
|
|
|
|
|
using System.Linq;
|
2023-03-24 15:57:37 +08:00
|
|
|
|
using System.Web.UI.DataVisualization.Charting;
|
2022-12-14 11:38:29 +08:00
|
|
|
|
|
|
|
|
|
|
namespace FineUIPro.Web.PHTGL.Filing
|
|
|
|
|
|
{
|
|
|
|
|
|
public partial class BidDocumentsStandingBook : PageBase
|
|
|
|
|
|
{
|
|
|
|
|
|
#region 项目主键
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 项目主键
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string ProjectId
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return (string)ViewState["ProjectId"];
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
ViewState["ProjectId"] = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
2023-03-29 16:51:16 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 级别,1 为项目级
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Type
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return (string)ViewState["Type"];
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
ViewState["Type"] = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-12-14 11:38:29 +08:00
|
|
|
|
#region 加载
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 加载页面
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!IsPostBack)
|
|
|
|
|
|
{
|
|
|
|
|
|
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
2023-03-16 18:20:05 +08:00
|
|
|
|
BLL.DepartService.InitDepartDropDownList(this.drpDepartId, false);
|
2023-03-29 16:51:16 +08:00
|
|
|
|
Type = Request.Params["Type"];
|
2022-12-14 11:38:29 +08:00
|
|
|
|
GetButtonPower();
|
2023-03-29 16:51:16 +08:00
|
|
|
|
if (Type=="1")
|
2022-12-14 11:38:29 +08:00
|
|
|
|
{
|
2023-03-30 14:04:56 +08:00
|
|
|
|
btnNew.OnClientClick = Window1.GetShowReference("BidDocumentsStandingBookEditProject.aspx", "基本信息") + "return false;";
|
2023-03-29 16:51:16 +08:00
|
|
|
|
this.ProjectId = this.CurrUser.LoginProjectId;
|
|
|
|
|
|
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.ProjectId = Request.Params["projectId"];
|
|
|
|
|
|
}
|
2022-12-14 11:38:29 +08:00
|
|
|
|
}
|
2023-03-29 16:51:16 +08:00
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
btnNew.OnClientClick = Window1.GetShowReference("BidDocumentsStandingBookEdit.aspx", "基本信息") + "return false;";
|
2022-12-14 11:38:29 +08:00
|
|
|
|
|
2023-03-29 16:51:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-12-14 11:38:29 +08:00
|
|
|
|
BindGrid();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 数据绑定
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private void BindGrid()
|
|
|
|
|
|
{
|
2023-03-24 15:57:37 +08:00
|
|
|
|
Model.PHTGL_BidDocumentsStandingBook _BidDocumentsStandingBook = new Model.PHTGL_BidDocumentsStandingBook();
|
2023-03-29 16:51:16 +08:00
|
|
|
|
|
|
|
|
|
|
if (Type=="1")
|
2023-03-21 10:21:07 +08:00
|
|
|
|
{
|
2023-03-29 16:51:16 +08:00
|
|
|
|
if (!(this.CurrUser.PersonId == Const.sysglyId || this.CurrUser.PersonId == Const.hfnbdId))
|
|
|
|
|
|
{
|
|
|
|
|
|
_BidDocumentsStandingBook.ProjectId = this.CurrUser.LoginProjectId;
|
|
|
|
|
|
}
|
2023-03-21 10:21:07 +08:00
|
|
|
|
}
|
2023-04-25 21:38:01 +08:00
|
|
|
|
|
|
|
|
|
|
var RoleIds = this.CurrUser.RoleIds;
|
|
|
|
|
|
|
|
|
|
|
|
if (RoleIds.Contains(Const.SedinHTGLManager))
|
|
|
|
|
|
{
|
|
|
|
|
|
//model.UnitId=this.CurrUser.UnitId;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (RoleIds.Contains(Const.OtherHTGLManager))
|
2023-03-21 10:21:07 +08:00
|
|
|
|
{
|
2023-04-25 21:38:01 +08:00
|
|
|
|
_BidDocumentsStandingBook.UnitId = this.CurrUser.UnitId;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (RoleIds.Contains(Const.SedinHTGLDepartManager))
|
|
|
|
|
|
{
|
|
|
|
|
|
_BidDocumentsStandingBook.UnitId = this.CurrUser.UnitId;
|
|
|
|
|
|
_BidDocumentsStandingBook.DepartId = this.CurrUser.DepartId;
|
2023-03-21 10:21:07 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
2023-04-25 21:38:01 +08:00
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
_BidDocumentsStandingBook.UnitId = "normal";
|
|
|
|
|
|
}
|
2023-03-30 14:04:56 +08:00
|
|
|
|
if (dropState.SelectedValue!=Const._Null)
|
2023-03-21 10:21:07 +08:00
|
|
|
|
{
|
2023-03-30 14:04:56 +08:00
|
|
|
|
_BidDocumentsStandingBook.State = Funs.GetNewInt(dropState.SelectedValue) ;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(txtEPCCode.Text))
|
|
|
|
|
|
{
|
|
|
|
|
|
_BidDocumentsStandingBook.EPCCode= txtEPCCode.Text;
|
2023-03-21 10:21:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(txtShortName.Text))
|
|
|
|
|
|
{
|
2023-03-24 15:57:37 +08:00
|
|
|
|
_BidDocumentsStandingBook.ProjectShortName= txtShortName.Text;
|
2023-03-21 10:21:07 +08:00
|
|
|
|
}
|
2023-03-30 14:04:56 +08:00
|
|
|
|
if (!string.IsNullOrEmpty(txtProjectCode.Text))
|
2023-03-21 10:21:07 +08:00
|
|
|
|
{
|
2023-03-30 14:04:56 +08:00
|
|
|
|
_BidDocumentsStandingBook.ProjectCode= txtProjectCode.Text;
|
2023-03-21 10:21:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-03-24 15:57:37 +08:00
|
|
|
|
var q= BLL.BidDocStandingBookService.GetPHTGL_BidDocumentsStandingBookByModle(_BidDocumentsStandingBook);
|
|
|
|
|
|
Grid1.RecordCount = q.Count;
|
|
|
|
|
|
Grid1.DataSource=q;
|
|
|
|
|
|
Grid1.DataBind();
|
2023-03-21 10:21:07 +08:00
|
|
|
|
|
2022-12-14 11:38:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 分页 排序
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 改变索引事件
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 分页下拉选择事件
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
|
|
|
|
|
BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 排序
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 关闭弹出窗体
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 关闭弹出窗体
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 查询
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询按钮
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void btnSearch_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
protected void btnReset_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
txtProjectCode.Text = string.Empty;
|
|
|
|
|
|
txtShortName.Text = string.Empty;
|
2023-03-30 14:04:56 +08:00
|
|
|
|
txtEPCCode.Text = string.Empty;
|
2023-03-24 15:57:37 +08:00
|
|
|
|
//txtSubConstruction.Text = string.Empty;
|
2022-12-14 11:38:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region 编辑
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 双击事件
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.EditData();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 右键编辑事件
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.EditData();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 编辑数据方法
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private void EditData()
|
|
|
|
|
|
{
|
2023-03-24 15:57:37 +08:00
|
|
|
|
if (Grid1.SelectedRowIndexArray.Length == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
string id = Grid1.SelectedRowID;
|
|
|
|
|
|
var model=BLL.BidDocStandingBookService.GetPHTGL_BidDocumentsStandingBookById(id);
|
|
|
|
|
|
if (model != null)
|
|
|
|
|
|
{
|
2023-03-29 16:51:16 +08:00
|
|
|
|
if (Type=="1")
|
|
|
|
|
|
{
|
2023-03-30 14:04:56 +08:00
|
|
|
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BidDocumentsStandingBookEditProject.aspx?BidDocumentsStandingBookId={0}", id, "编辑 - ")));
|
2023-03-29 16:51:16 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BidDocumentsStandingBookEdit.aspx?BidDocumentsStandingBookId={0}", id, "编辑 - ")));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2023-03-24 15:57:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
protected void btnEdit_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
EditData();
|
2022-12-14 11:38:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 删除
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 右键删除事件
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
//if (Grid1.SelectedRowIndexArray.Length > 0)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// bool isShow = false;
|
|
|
|
|
|
// if (Grid1.SelectedRowIndexArray.Length == 1)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// isShow = true;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
|
|
|
|
|
// if (this.judgementDelete(rowID, isShow))
|
|
|
|
|
|
// {
|
|
|
|
|
|
// var p = BLL.ContractService.GetContractById(rowID);
|
|
|
|
|
|
// var Sub = BLL.SubcontractAgreementService.GetSubcontractAgreementByContractId(rowID);
|
|
|
|
|
|
// var Spe = PHTGL_SpecialTermsConditionsService.GetSpecialTermsConditionsByContractId(rowID);
|
|
|
|
|
|
// if (Sub != null)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// SubcontractAgreementService.DeleteSubcontractAgreementBycontractId(rowID);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (Spe != null)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// PHTGL_SpecialTermsConditionsService.DeleteSpecialTermsConditionsBycontractId(rowID);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (p != null)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// BLL.LogService.AddSys_Log(this.CurrUser, p.ContractName, p.ContractId, BLL.Const.ContractMenuId, BLL.Const.BtnDelete);
|
|
|
|
|
|
// BLL.ContractService.DeleteContractById(rowID);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// BindGrid();
|
|
|
|
|
|
// ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
|
|
|
|
|
//}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 判断是否可以删除
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
private bool judgementDelete(string id, bool isShow)
|
|
|
|
|
|
{
|
|
|
|
|
|
string content = string.Empty;
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(content))
|
|
|
|
|
|
{
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
if (isShow)
|
|
|
|
|
|
{
|
|
|
|
|
|
Alert.ShowInTop(content);
|
|
|
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 获取按钮权限
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取按钮权限
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="button"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
private void GetButtonPower()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (Request.Params["value"] == "0")
|
|
|
|
|
|
{
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2023-03-29 16:51:16 +08:00
|
|
|
|
var buttonList = CommonService.GetAllButtonList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.ProjectBidDocumentsStandingBookMenuId);
|
2022-12-14 11:38:29 +08:00
|
|
|
|
if (buttonList.Count() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (buttonList.Contains(Const.BtnAdd))
|
|
|
|
|
|
{
|
2023-03-21 10:21:07 +08:00
|
|
|
|
btnNew.Hidden = false;
|
2022-12-14 11:38:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (buttonList.Contains(Const.BtnModify))
|
|
|
|
|
|
{
|
|
|
|
|
|
// btnMenuEdit.Hidden = false;
|
2023-03-24 15:57:37 +08:00
|
|
|
|
btnEdit.Hidden = false;
|
2022-12-14 11:38:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (buttonList.Contains(Const.BtnDelete))
|
|
|
|
|
|
{
|
|
|
|
|
|
// btnMenuDelete.Hidden = false;
|
2023-03-24 15:57:37 +08:00
|
|
|
|
btnDelete.Hidden = false;
|
2022-12-14 11:38:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region 导出按钮
|
|
|
|
|
|
/// 导出按钮
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void btnOut_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response.ClearContent();
|
|
|
|
|
|
string filename = Funs.GetNewFileName();
|
|
|
|
|
|
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("施工分包合同管理台账" + filename, System.Text.Encoding.UTF8) + ".xls");
|
|
|
|
|
|
Response.ContentType = "application/excel";
|
|
|
|
|
|
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
|
|
|
|
|
//this.Grid1.PageSize = this.;
|
|
|
|
|
|
BindGrid();
|
|
|
|
|
|
Response.Write(GetGridTableHtml(Grid1));
|
|
|
|
|
|
Response.End();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//#pragma warning disable CS0108 // “PersonList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
|
|
|
|
|
|
// /// <summary>
|
|
|
|
|
|
// /// 导出方法
|
|
|
|
|
|
// /// </summary>
|
|
|
|
|
|
// /// <param name="grid"></param>
|
|
|
|
|
|
// /// <returns></returns>
|
|
|
|
|
|
// private string GetGridTableHtml(Grid grid)
|
|
|
|
|
|
//#pragma warning restore CS0108 // “PersonList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
|
|
|
|
|
|
// {
|
|
|
|
|
|
// StringBuilder sb = new StringBuilder();
|
|
|
|
|
|
// sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
|
|
|
|
|
// sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
|
|
|
|
|
|
// sb.Append("<tr>");
|
|
|
|
|
|
// foreach (GridColumn column in grid.Columns)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// sb.AppendFormat("<td>{0}</td>", column.HeaderText);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// sb.Append("</tr>");
|
|
|
|
|
|
// foreach (GridRow row in grid.Rows)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// sb.Append("<tr>");
|
|
|
|
|
|
// foreach (GridColumn column in grid.Columns)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// string html = row.Values[column.ColumnIndex].ToString();
|
|
|
|
|
|
// if (column.ColumnID == "tfNumber")
|
|
|
|
|
|
// {
|
|
|
|
|
|
// html = (row.FindControl("labNumber") as AspNet.Label).Text;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (column.ColumnID == "tfI")
|
|
|
|
|
|
// {
|
|
|
|
|
|
// html = (row.FindControl("lbI") as AspNet.Label).Text;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// //sb.AppendFormat("<td>{0}</td>", html);
|
|
|
|
|
|
// sb.AppendFormat("<td style='vnd.ms-excel.numberformat:@;width:140px;'>{0}</td>", html);
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// sb.Append("</tr>");
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// sb.Append("</table>");
|
|
|
|
|
|
|
|
|
|
|
|
// return sb.ToString();
|
|
|
|
|
|
// }
|
|
|
|
|
|
#endregion
|
2023-03-24 15:57:37 +08:00
|
|
|
|
|
|
|
|
|
|
protected void btnImport_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
2023-03-29 16:51:16 +08:00
|
|
|
|
if (Type=="1")
|
|
|
|
|
|
{
|
|
|
|
|
|
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("BidDocumentsStandingBookIn.aspx?Type=1", "导入 - ")));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("BidDocumentsStandingBookIn.aspx", "导入 - ")));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2023-03-24 15:57:37 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
public string ConvertState(object State)
|
|
|
|
|
|
{
|
|
|
|
|
|
string StateName = string.Empty;
|
|
|
|
|
|
if (State!=null&&!string.IsNullOrEmpty(State.ToString()))
|
|
|
|
|
|
{
|
|
|
|
|
|
switch (State.ToString())
|
|
|
|
|
|
{
|
|
|
|
|
|
case "0":
|
|
|
|
|
|
StateName = "未提交";
|
|
|
|
|
|
break;
|
|
|
|
|
|
case "1":
|
|
|
|
|
|
StateName = "已提交";
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
StateName = "未提交";
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
StateName = "未提交";
|
|
|
|
|
|
}
|
|
|
|
|
|
return StateName;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected void btnDelete_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (Grid1.SelectedRowIndexArray.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
bool isShow = false;
|
|
|
|
|
|
if (Grid1.SelectedRowIndexArray.Length == 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
isShow = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
|
|
|
|
|
{
|
|
|
|
|
|
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
|
|
|
|
|
if (this.judgementDelete(rowID, isShow))
|
|
|
|
|
|
{
|
|
|
|
|
|
var p = BLL.BidDocStandingBookService.GetPHTGL_BidDocumentsStandingBookById(rowID);
|
|
|
|
|
|
if (p != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (p.State==1)
|
|
|
|
|
|
{
|
|
|
|
|
|
ShowNotify(message: "已提交,删除失败!", MessageBoxIcon.Error);
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
// BLL.LogService.AddSys_Log(this.CurrUser, p.ContractName, p.ContractId, BLL.Const.ContractMenuId, BLL.Const.BtnDelete);
|
|
|
|
|
|
BLL.BidDocStandingBookService.DeletePHTGL_BidDocumentsStandingBookById(rowID);
|
2023-03-29 16:51:16 +08:00
|
|
|
|
AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-BidUnit", Const.ProjectBidDocumentsStandingBookMenuId);
|
|
|
|
|
|
AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-BidNotice", Const.ProjectBidDocumentsStandingBookMenuId);
|
|
|
|
|
|
AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-ActionPlan", Const.ProjectBidDocumentsStandingBookMenuId);
|
|
|
|
|
|
AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-BidDocuments", Const.ProjectBidDocumentsStandingBookMenuId);
|
|
|
|
|
|
AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-ApprovePersonForm", Const.ProjectBidDocumentsStandingBookMenuId);
|
|
|
|
|
|
AttachFileService.DeleteAttachFile(Funs.RootPath, rowID + "-SetSubReview", Const.ProjectBidDocumentsStandingBookMenuId);
|
|
|
|
|
|
AttachFileService.DeleteAttachFile(Funs.RootPath, rowID +"-ShortListApproval", Const.ProjectBidDocumentsStandingBookMenuId);
|
2023-03-24 15:57:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
BindGrid();
|
|
|
|
|
|
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-14 11:38:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|