using BLL; using FineUIPro.Web.PHTGL.BiddingManagement; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; namespace FineUIPro.Web.PHTGL.Filing { public partial class Files : PageBase { #region 加载 /// /// 加载页面 /// /// /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); GetButtonPower(); BindGrid(); } } #endregion #region 数据绑定 /// /// 数据绑定 /// private void BindGrid() { } #endregion #region 分页 排序 /// /// 改变索引事件 /// /// /// protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) { BindGrid(); } /// /// 分页下拉选择事件 /// /// /// protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) { Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); BindGrid(); } /// /// 排序 /// /// /// protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) { BindGrid(); } protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) { //object[] keys = Grid1.DataKeys[e.RowIndex]; //string fileId = string.Empty; //if (keys == null) //{ // return; //} //else //{ // fileId = keys[0].ToString(); //} //if (e.CommandName == "export") //{ // ActionPlanFormation actionPlanFormation = new ActionPlanFormation(); // var Act = BLL.PHTGL_ActionPlanReviewService.GetPHTGL_ActionPlanReviewById(fileId); // actionPlanFormation.Print(Act.ActionPlanID); // return; //} //if (e.CommandName == "download") //{ // PageContext.RegisterStartupScript(Windowtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ActionPlanAttachUrl&menuId={1}", fileId, BLL.Const.ActionPlanReview))); // return; //} } #endregion #region 查询 重置 /// /// 查询按钮 /// /// /// protected void btnSearch_Click(object sender, EventArgs e) { BindGrid(); } protected void btnRset_Click(object sender, EventArgs e) { txtActionPlanCode.Text = ""; BindGrid(); } #endregion #region 获取按钮权限 /// /// 获取按钮权限 /// /// /// private void GetButtonPower() { if (Request.Params["value"] == "0") { return; } var buttonList = CommonService.GetAllButtonList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.ActionPlanReview); if (buttonList.Count() > 0) { if (buttonList.Contains(Const.BtnAdd)) { } if (buttonList.Contains(Const.BtnDelete)) { } } } #endregion #region 打印 protected void btnPrinter_Click(object sender, EventArgs e) { //if (Grid1.SelectedRowIndexArray.Length == 0) //{ // Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); // return; //} //string Id = Grid1.SelectedRowID; //var Act = PHTGL_ActionPlanReviewService.GetPHTGL_ActionPlanReviewById(Id); //if (Act == null) //{ // Alert.ShowInTop("还未创建审批流无法导出!", MessageBoxIcon.Warning); // return; //} //string ActionPlanID = Act.ActionPlanID; //ActionPlanFormation actionPlanFormation = new ActionPlanFormation(); //actionPlanFormation.Print(ActionPlanID); } #endregion } }