private void bindReport(string singleprojectid) { BLL.T_SingleProject_BLL spBLL = new T_SingleProject_BLL(); Model.T_SingleProject_MDL spMDL = spBLL.GetModel(Common.ConvertEx.ToInt(singleprojectid)); string strWhere = "SingleProjectID=" + singleprojectid; if (Common.Session.GetSession("SuperAdmin").ToLower() == "true" || Common.Session.GetSession("IsCompany") == false.ToString().ToLower()) {//Leo 超级管理员看全部 } else if (spMDL != null && spMDL.CompanyUserID == Common.ConvertEx.ToInt(Common.Session.GetSession("UserID"))) {//Leo 工程管理员也看全部,档案馆的人也可以看全部 } else { strWhere += " and operateuserid=" + Common.Session.GetSession("UserID"); } DataSet dsarchive = new DataSet(); //Leo 要改 //dsarchive = (new T_FileList_BLL()).GetClientList(strWhere); dsarchive = (new T_FileList_BLL()).GetList(strWhere); Recursion(dsarchive.Tables[0], 0, 0); string str_gcmc = "归档目录"; BLL.T_SingleProject_BLL singproject = new T_SingleProject_BLL(); DataSet dssingleproject = singproject.GetList("singleprojectid=" + singleprojectid); if (dssingleproject.Tables[0].Rows.Count > 0) { str_gcmc = dssingleproject.Tables[0].Rows[0]["gcmc"].ToString() + "归档目录列表"; } // //取报表文件和打印数据 // DigiPower.Onlinecol.Standard.BLL.Record record = new DigiPower.Onlinecol.Standard.BLL.Record(); // DataSet ds = new DataSet(); string strReport = Server.MapPath(@"../ReportTemplate/20100409001.mrt"); StiReport report = new StiReport(); report.Load(strReport); report.RegData("报表", dsarchive); //获取工程 StiText sti_gcmc = (StiText)report.GetComponentByName("txtGCMC"); if (sti_gcmc != null) { sti_gcmc.Text = str_gcmc; //动态设置制表单位 } // if (_printType == "1" || _printType == "2" || _printType == "5") // StiReportResponse.ResponseAsPdf(this, report, false); // else report.Compile(); report.Render(false); StiWebViewer1.Report = report; }
//绑定归档目录 void BindGridView(int pageIndex) { BLL.T_SingleProject_BLL spBLL = new T_SingleProject_BLL(); Model.T_SingleProject_MDL spMDL = spBLL.GetModel(Common.ConvertEx.ToInt(singleProjectID)); string strWhere = " SingleProjectID=" + singleProjectID + " AND ArchiveID=" + archiveID; if (ctrlDropDownFileList.SelectValue != "0") { strWhere += " AND BH like '" + ctrlDropDownFileList.SelectValue + "%' "; } if (txtTitle.Text != "") { strWhere += " AND TITLE LIKE '%" + txtTitle.Text + "%'"; } if (Status.SelectValue != "0" && Status.SelectValue != "") { strWhere += " AND Status=" + Status.SelectValue; } DataTable dt = fileListBLL.GetListPaging(strWhere, pageSize, pageIndex, out itemCount);; AspNetPager.AlwaysShow = true; AspNetPager.PageSize = pageSize; AspNetPager.RecordCount = itemCount; gvData.DataSource = dt; gvData.DataBind(); }
public void DataBindEx(int SingleProjectID, bool IsFolder) { BLL.T_FileList_BLL bll = new DigiPower.Onlinecol.Standard.BLL.T_FileList_BLL(); DataSet ds = new DataSet(); string strWhere2 = "SingleProjectID=" + SingleProjectID; if (IsFolder == true) { strWhere2 += " AND IsFolder='True'"; } ds = bll.GetList(strWhere2); if (ds.Tables.Count > 0) { DataTable outDT = ds.Tables[0].Copy(); outDT.Clear(); Recursion(ds.Tables[0], 0, 0, ref outDT); ds.Tables.Clear(); ds.Tables.Add(outDT); BLL.T_SingleProject_BLL spBLL = new T_SingleProject_BLL(); Model.T_SingleProject_MDL spMDL = spBLL.GetModel(SingleProjectID); string strWhere = "1=1"; if (Common.Session.GetSession("SuperAdmin").ToLower() == "true") {//Leo 超级管理员看全部 } else if (spMDL != null && spMDL.CompanyUserID == Common.ConvertEx.ToInt(Common.Session.GetSession("UserID"))) {//Leo 工程管理员也看全部 } else { strWhere += " and OperateUserID=" + Common.Session.GetSession("UserID"); } if (strWhere != "1=1") { if (ds.Tables.Count > 0) { DataView dv = ds.Tables[0].Copy().DefaultView; dv.RowFilter = strWhere; if (dv.Count != ds.Tables[0].Rows.Count) { ds.Tables[0].Clear(); ds.Tables.RemoveAt(0); ds.Tables.Add(dv.ToTable()); } } } } DropDownList1.DataTextField = "TitleNew"; DropDownList1.DataValueField = "FileListID"; DropDownList1.DataSource = ds; DropDownList1.DataBind(); //DropDownList1.Items.Insert(0, new ListItem("无", "0")); }
public DataTable GetFileListTable(string Title, string SingleProjectID) { try { T_FileList_BLL bll = new T_FileList_BLL(); DataSet ds = new DataSet(); ds = bll.GetList("SingleProjectID=" + SingleProjectID + ""); if (ds.Tables.Count > 0) { DataTable outDT = ds.Tables[0].Copy(); outDT.Clear(); Recursion(ds.Tables[0], 0, 0, ref outDT); ds.Tables.Clear(); ds.Tables.Add(outDT); BLL.T_SingleProject_BLL spBLL = new T_SingleProject_BLL(); Model.T_SingleProject_MDL spMDL = spBLL.GetModel(Common.ConvertEx.ToInt(SingleProjectID)); string strWhere = "1=1"; if (Session["SuperAdmin"].ToString().ToLower() == "true") {//Leo 超级管理员看全部 } else if (spMDL != null && spMDL.CompanyUserID == Common.ConvertEx.ToInt(Session["UserID"])) {//Leo 工程管理员也看全部 } else { strWhere += " and OperateUserID=" + Session["UserID"].ToString(); } strWhere += " AND Title like '%" + Title + "%'"; if (strWhere != "1=1") { if (ds.Tables.Count > 0) { DataView dv = ds.Tables[0].Copy().DefaultView; dv.RowFilter = strWhere; if (dv.Count != ds.Tables[0].Rows.Count) { ds.Tables[0].Clear(); ds.Tables.RemoveAt(0); ds.Tables.Add(dv.ToTable()); } } } } return(ds.Tables[0]); } catch { return(null); } }
public void UpdatedhNew(string ArchiveID) { int wzCount_P = 0; int tzCount_P = 0; int zpCount_P = 0; T_Archive_MDL mdl = dal.GetModel(int.Parse(ArchiveID)); DataSet ds = dal.GetList("ShortDH='' AND SingleProjectID=" + mdl.SingleProjectID); if (ds != null && ds.Tables.Count > 0) { DataRow[] drList = ds.Tables[0].Select("", "xh"); int maxShortDH = dal.GetMaxShortDH(); maxShortDH++; BLL.T_FileList_BLL fileBLL = new T_FileList_BLL(); foreach (DataRow dr in drList) { mdl = dal.GetModel(int.Parse(dr["archiveid"].ToString())); mdl.ShortDH = maxShortDH.ToString(); //Leo 案卷sl统计 2012-09-26 int ManualCount = fileBLL.GetManualCountByArchiveID(mdl.ArchiveID); if (mdl.ajlx == "183") { mdl.wzCount = ManualCount; wzCount_P += ManualCount; } if (mdl.ajlx == "184") { mdl.tzCount = ManualCount; tzCount_P += ManualCount; } if (mdl.ajlx == "185") { mdl.zpCount = ManualCount; zpCount_P += ManualCount; } dal.Update(mdl); maxShortDH++; } } //Leo 2012-09-26 if (mdl.SingleProjectID != null) { BLL.T_SingleProject_BLL projBLL = new T_SingleProject_BLL(); Model.T_SingleProject_MDL projMDL = projBLL.GetModel(int.Parse(mdl.SingleProjectID.ToString())); projMDL.wzCount = wzCount_P; projMDL.tzCount = tzCount_P; projMDL.zpCount = zpCount_P; projBLL.Update(projMDL); } }
/// <summary> /// 更新工程工作流流程到下一步 /// </summary> /// <param name="SingleProjectID">工程ID</param> /// <param name="workflowid">流程ID</param> /// <returns></returns> public bool GoNextProjectWorkFlowSataus(int SingleProjectID, int WorkFlowID) { //更新最后一次的工程,下次它排前面,方便操作些 BLL.T_SingleProject_BLL spBLL = new T_SingleProject_BLL(); Model.T_SingleProject_MDL spMDL = spBLL.GetModel(SingleProjectID); spMDL.LastUserTime = DateTime.Now; //提交或退回的时间 jdk 2015.03.14 spBLL.Update(spMDL); //==================== Model.T_WorkFlowDefine_MDL wkfMDL = new T_WorkFlowDefine_MDL(); wkfMDL.WorkFlowID = WorkFlowID; wkfMDL.IsRollBack = false; //归0 wkfMDL.SingleProjectID = SingleProjectID; wkfMDL.SubmitStatus = 0; //2010-07-13 变0表示未提交和受理 1就选中了 wkfMDL.SubmitUserID = Common.ConvertEx.ToInt(Common.Session.GetSession("UserID")); wkfMDL.SubmitDateTime = DateTime.Now; DataSet ds = new DataSet(); ds = (new T_WorkFlowDefine_BLL()).UpdateProjectWorkFlowStatus(wkfMDL); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { if (ds.Tables[0].Rows[0]["del"].ToString() == "True") { return(GoNextProjectWorkFlowSataus(SingleProjectID, ConvertEx.ToInt(ds.Tables[0].Rows[0]["workflowid"].ToString()))); } else {//往下走了。需要把下一工作流的用户加入到当前工程中来。 //BLL.T_WorkFlow_BLL bll = new T_WorkFlow_BLL(); //Model.T_WorkFlow_MDL mdl = bll.GetList(" WorkFlowID=" + ds.Tables[0].Rows[0]["WorkFlowID"] + " AND OrderIndex=1"); //if (mdl.RoleID > 0) //{ // T_SingleProjectUser_MDL userMDL = new T_SingleProjectUser_MDL(); // userMDL.RoleID = mdl.RoleID; // userMDL.SingleProjectID = Common.ConvertEx.ToInt(ds.Tables[0].Rows[0]["SingleProjectID"]); // userMDL.CreateDate = DateTime.Now; // T_SingleProjectUser_BLL userBLL = new T_SingleProjectUser_BLL(); // userBLL.Add(userMDL); //} return(true); } } else { return(false); } }
//绑定归档目录 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(); }
public string SubMitProject(string singleProjectID, string workFlowID, string workFlowDefineID) { Model.T_SingleProject_MDL spMDL = (new BLL.T_SingleProject_BLL()).GetModel(ConvertEx.ToInt(singleProjectID)); BLL.T_FileList_BLL flBLL = new T_FileList_BLL(); DataSet ds2 = flBLL.GetList("SingleProjectID=" + singleProjectID); if (!String.IsNullOrEmpty(spMDL.gcbm) && ds2.Tables.Count > 0 && ds2.Tables[0].Rows.Count > 0) { //窗口接收提交的时候,更新该工程所有案卷下的文件序号,根据文件编号排序更新 if (ConvertEx.ToInt(workFlowID) == PublicModel.getWorkFlowIdByWorkFlowCode(SystemSet.EumWorkFlowCode.WINRECV.ToString())) { new T_Archive_BLL().updateFileOrderIndexBySingleProjectID(singleProjectID); } BLL.T_WorkFlowDefine_BLL wkBLL = new T_WorkFlowDefine_BLL(); Model.T_WorkFlowDefine_MDL wkMDL = wkBLL.GetModel(ConvertEx.ToInt(workFlowDefineID)); if (String.IsNullOrEmpty(wkMDL.SubmitCellPath)) //有些地方不需要填申请单的 { WorkFlowManage workflowmanage = new WorkFlowManage(); if (workflowmanage.GoNextProjectWorkFlowSataus(ConvertEx.ToInt(singleProjectID), ConvertEx.ToInt(workFlowID))) { return(SystemSet._RETURN_SUCCESS_VALUE); } else { return(SystemSet._RETURN_FAILURE_VALUE); } } else //填申请单的未做 { return(SystemSet._RETURN_SUCCESS_VALUE); } } else { return("请选分配任务!"); } }