/// <summary> /// 绑定页面 /// </summary> /// <param name="ID"></param> private void BindPage(string ID) { if (!String.IsNullOrWhiteSpace(ID)) { T_WorkFlow_MDL model = workFlowBLL.GetModel(Common.ConvertEx.ToInt(ID)); if (model != null) { PID.DataBindEx(Common.ConvertEx.ToInt(model.CompanyID), false); Comm.SetValueToPage(model, this.tbl); chkMenuRight.setSelectValue = model.RightListID; ViewState["model"] = model; } } }
/// <summary> /// 绑定数据 /// </summary> /// <param name="WorkFlowID"></param> /// <param name="pageInde"></param> private void BindGrid(int pageIndex) { BLL.T_WorkFlow_BLL wfBLL = new T_WorkFlow_BLL(); Model.T_WorkFlow_MDL wfMDL = wfBLL.GetModel(workFlowID); workFlowCode = wfMDL.WorkFlowCode; string sqlWhere = string.Empty; if (PublicModel.isSuperAdmin()) //管理员管理员获取所有工程 { sqlWhere = " AND AREA_CODE LIKE '" + Common.Session.GetSession("AREA_CODE") + "%'"; //加区域了。 } else if (PublicModel.isArchiveUser()) //档案馆用户看自己的 { sqlWhere = " AND AREA_CODE LIKE '" + Common.Session.GetSession("OLD_AREA_CODE") + "%'"; //加区域了。 } if (!String.IsNullOrEmpty(txtGcmc.Text)) { sqlWhere += " AND gcmc like '%" + txtGcmc.Text + "%'"; } if (!String.IsNullOrEmpty(txtGcbm.Text)) { sqlWhere += " AND gcbm like '%" + txtGcbm.Text + "%'"; } DataTable dt = null; if (ViewState["CurrentPageIndex"] == null && Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex")) > 0) { pageIndex = Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex")); ViewState["CurrentPageIndex"] = pageIndex; } else { pageIndex = ConvertEx.ToInt(ViewState["CurrentPageIndex"]); } if (PublicModel.isSuperAdmin()) { dt = flowDefineBLL.GetLHSignatureListPaging(workFlowID.ToString(), false, "", "", sqlWhere, pageSize, pageIndex, out itemCount); } else { dt = flowDefineBLL.GetLHSignatureListPaging(workFlowID.ToString(), Common.Session.GetSessionBool("IsCompany"), Common.Session.GetSession("RoleID"), Common.Session.GetSession("UserID"), sqlWhere, pageSize, pageIndex, out itemCount); } AspNetPager.AlwaysShow = true; AspNetPager.PageSize = pageSize; AspNetPager.RecordCount = itemCount; AspNetPager.CurrentPageIndex = pageIndex; gvData.DataSource = dt; gvData.DataBind(); }
/// <summary> /// 绑定数据 /// </summary> /// <param name="WorkFlowID"></param> /// <param name="pageInde"></param> private void BindGrid(int pageIndex) { T_WorkFlow_BLL wfBLL = new T_WorkFlow_BLL(); T_WorkFlow_MDL wfMDL = wfBLL.GetModel(workFlowID); workFlowCode = wfMDL.WorkFlowCode; string sqlWhere = string.Empty; if (Common.ConvertEx.ToBool(Common.Session.GetSession("SuperAdmin")) == true) //管理员管理员获取所有工程 { sqlWhere = " AND AREA_CODE LIKE '" + Session["AREA_CODE"].ToString() + "%'"; //加区域了。 } else if (Common.ConvertEx.ToBool(Common.Session.GetSession("SuperAdmin")) == false && Common.Session.GetSession("IsCompany") == false.ToString().ToLower()) //档案馆用户看自己的 { sqlWhere = " AND AREA_CODE LIKE '" + Session["OLD_AREA_CODE"].ToString() + "%'"; //加区域了。 } if (!String.IsNullOrEmpty(gcmc.Text)) { sqlWhere += " AND gcmc like '%" + gcmc.Text + "%'"; } if (!String.IsNullOrEmpty(gcbm.Text)) { sqlWhere += " AND gcbm like '%" + gcbm.Text + "%'"; } DataTable dt = null; if (Common.Session.GetSession("SuperAdmin").ToLower() == "true") { dt = flowDefineBLL.GetListPaging(workFlowID.ToString(), false, "", "", sqlWhere, pageSize, pageIndex, out itemCount); } else { dt = flowDefineBLL.GetListPaging(workFlowID.ToString(), Common.Session.GetSessionBool("IsCompany"), Common.Session.GetSession("RoleID"), Common.Session.GetSession("UserID"), sqlWhere, pageSize, pageIndex, out itemCount); } AspNetPager.AlwaysShow = true; AspNetPager.PageSize = pageSize; AspNetPager.RecordCount = itemCount; gvData.DataSource = dt; gvData.DataBind(); }
public bool DelWrokFlow(string WorkFlowID) { bool flag = false; try { T_WorkFlow_MDL workFlowMDL = workFlowBLL.GetModel(ConvertEx.ToInt(WorkFlowID)); if (workFlowMDL != null) { PublicModel.writeLog(SystemSet.EumLogType.DelData.ToString(), string.Concat("T_WorkFlow;key=", workFlowMDL.WorkFlowID, ";CompanyID=", workFlowMDL.CompanyID, ";WorkFlowCode=", workFlowMDL.WorkFlowCode, ";WorkFlowName=", workFlowMDL.WorkFlowName)); } CBLL.WorkFlowManage cbll = new DigiPower.Onlinecol.Standard.CBLL.WorkFlowManage(); cbll.Delete(Common.ConvertEx.ToInt(WorkFlowID)); flag = true; } catch (Exception ex) { Common.LogUtil.Debug(this, "流程删除失败", ex); } return(flag); }
/// <summary> /// 绑定数据 /// </summary> /// <param name="pageIndex"></param> private void BindGrid(int pageIndex) { BLL.T_WorkFlow_BLL wfBLL = new T_WorkFlow_BLL(); Model.T_WorkFlow_MDL wfMDL = wfBLL.GetModel(ConvertEx.ToInt(workFlowID)); workFlowCode = wfMDL.WorkFlowCode; string sqlWhere = string.Empty; if (PublicModel.isSuperAdmin()) //管理员管理员获取所有工程 { sqlWhere = " AND AREA_CODE LIKE '" + Common.Session.GetSession("AREA_CODE") + "%'"; } else if (PublicModel.isArchiveUser()) //档案馆用户看自己的 { sqlWhere = " AND AREA_CODE LIKE '" + Common.Session.GetSession("OLD_AREA_CODE") + "%'"; } if (!String.IsNullOrEmpty(gcmc.Text)) { sqlWhere += " AND gcmc like '%" + gcmc.Text + "%'"; } if (!String.IsNullOrEmpty(gcbm.Text)) { sqlWhere += " AND gcbm like '%" + gcbm.Text + "%'"; } if (ViewState["CurrentPageIndex"] == null && Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex")) > 0) { pageIndex = Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex")); ViewState["CurrentPageIndex"] = pageIndex; } else { pageIndex = ConvertEx.ToInt(ViewState["CurrentPageIndex"]); } bool isChargeUser = false; if ((SystemSet._DEFAULT_RECV_WORKFLOWID + ",").IndexOf(workFlowID + ",") > -1) { isChargeUser = true; } DataTable dt = null; if (PublicModel.isSuperAdmin()) { dt = flowDefineBLL.GetListPaging(workFlowID, false, "", "", sqlWhere, pageSize, pageIndex, out itemCount); } else { dt = flowDefineBLL.GetListPaging(workFlowID, Common.Session.GetSessionBool("IsCompany"), "", Common.Session.GetSession("UserID"), sqlWhere, pageSize, pageIndex, out itemCount, isChargeUser); } AspNetPager.AlwaysShow = true; AspNetPager.PageSize = pageSize; AspNetPager.RecordCount = itemCount; AspNetPager.CurrentPageIndex = pageIndex; rpData.DataSource = dt; rpData.DataBind(); }