//绑定归档目录 private void BindGridView(int pageIndex) { Model.T_SingleProject_MDL spMDL = spBLL.GetModel(Common.ConvertEx.ToInt(SingleProjectID.Value)); //singleProjectNo = spMDL.gcbm; //取当前工程的所有归档目录 string strWhere = " SingleProjectID=" + SingleProjectID.Value; //不显示声像节点 //jdk 2014.11.16 strWhere += " AND BH not like '%S%' "; if (Common.Session.GetSession("SuperAdmin").ToLower() == "true" || Common.Session.GetSession("IsCompany") == false.ToString().ToLower()) //Leo 超级管理员看全部 档案馆的人也可以看全部 { strWhere += " AND ((IsFolder=0) OR (IsFolder=0 AND CONVERT_FLAG=1))"; } else { if (!string.IsNullOrEmpty(companyID.Value) && companyID.Value != "0") { Model.T_Company_MDL comMDL = comBLL.GetModel(Common.ConvertEx.ToInt(companyID.Value)); if (comMDL != null) { //strWhere += string.Format(" AND ((IsFolder=1 AND DefaultCompanyType={0})", // comMDL.CompanyType); strWhere += string.Format(" AND (IsFolder=0 AND CompanyID={0} AND CONVERT_FLAG=1) ", comMDL.CompanyID); } } } Session["FileInfostrWhere"] = strWhere; DataTable dt = fileBLL.GetListPaging(strWhere, pageSize, pageIndex, out itemCount); AspNetPager.AlwaysShow = true; AspNetPager.PageSize = pageSize; AspNetPager.RecordCount = itemCount; gvData.DataSource = dt; gvData.DataBind(); }
protected void btnSignature_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(SingleProjectID.Value)) { string isAll = "0"; string strWhere = "SingleProjectID=" + SingleProjectID.Value; if (Common.Session.GetSession("SuperAdmin").ToLower() == "true" || Common.Session.GetSession("IsCompany") == false.ToString().ToLower()) //Leo 超级管理员看全部 档案馆的人也可以看全部 { strWhere += " AND IsFolder=0 AND CONVERT_FLAG=1 AND ISNULL(SIGNATURE_FLAG,0)=0"; isAll = "1"; } else { if (!string.IsNullOrEmpty(companyID.Value) && companyID.Value != "0") { Model.T_Company_MDL comMDL = comBLL.GetModel(Common.ConvertEx.ToInt(companyID.Value)); if (comMDL != null) { strWhere += " AND IsFolder=0 AND CONVERT_FLAG=1 AND ISNULL(SIGNATURE_FLAG,0)=0"; strWhere += string.Format(" AND CompanyID={0}", comMDL.CompanyID); } } } DataSet ds = fileBLL.GetList(strWhere, "bh", true); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { ClientScript.RegisterStartupScript(Page.GetType(), "calculateHash", string.Format( "<script type='text/javascript'>calculateHash({0},{1},{2});</script>", SingleProjectID.Value, companyID.Value, isAll)); } else { Common.MessageBox.Show(this, "没有可签章的文件!"); } } else { Common.MessageBox.Show(this, "获取工程主键时出错,请关闭后重新打开!"); } }
/// <summary> /// 批量重置按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnReset_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(SingleProjectID.Value)) { string strWhere = "SingleProjectID=" + SingleProjectID.Value; if (Common.Session.GetSession("SuperAdmin").ToLower() == "true" || Common.Session.GetSession("IsCompany") == false.ToString().ToLower())//Leo 超级管理员看全部 档案馆的人也可以看全部 { strWhere += " AND IsFolder=0 AND CONVERT_FLAG=1 AND ISNULL(SIGNATURE_FLAG,0)=0"; } else { if (!string.IsNullOrEmpty(companyID.Value) && companyID.Value != "0") { Model.T_Company_MDL comMDL = comBLL.GetModel(Common.ConvertEx.ToInt(companyID.Value)); if (comMDL != null) { strWhere += " AND IsFolder=0 AND CONVERT_FLAG=1 AND ISNULL(SIGNATURE_FLAG,0)=1"; strWhere += string.Format(" AND CompanyID={0}", comMDL.CompanyID); } } } List <T_FileList_MDL> fileList = fileBLL.GetModelList(strWhere); if (fileList != null) { foreach (T_FileList_MDL obj in fileList) { if (GetSignatureLogCount(obj.FileListID.ToString()) < 1) //联合签章,则不重置 { ResetFile(obj); } } } } else { Common.MessageBox.Show(this, "获取工程主键时出错,请关闭后重新打开!"); } }