public static int AddTbl_ProjectContract(Tbl_ProjectContract tbl_projectcontract) { WebCommon.Public.WriteLog("添加合同:" + tbl_projectcontract.ProjectID); int count = new Tbl_ProjectContractService().AddTbl_ProjectContract(tbl_projectcontract); if (count > 0) { //添加合同成功的时候更新项目的节点信息 WebModels.Tbl_Project project = WebBLL.Tbl_ProjectManager.GetTbl_ProjectById(tbl_projectcontract.ProjectID); project.ProjectNo = tbl_projectcontract.PC_Name; //生成项目编号 project.NodeNo = "确认设总"; project.NodeUser = WebBLL.Tbl_ConfigManager.GetTbl_ConfigById(1).C_Set5; //技术副院长 WebBLL.Tbl_ProjectManager.UpdateTbl_Project(project); } return(count); }
public static int UpdateTbl_Project(Tbl_Project tbl_project) { WebCommon.Public.WriteLog("修改项目:" + tbl_project.ProjectName); tbl_project.DealUser = WebCommon.Public.GetUserName(); tbl_project.DealTime = DateTime.Now; WebModels.Tbl_Project pro = WebBLL.Tbl_ProjectManager.GetTbl_ProjectById(tbl_project.ID); //查询旧节点信息 if (tbl_project.Status == "进行中" && tbl_project.NodeNo != pro.NodeNo) { //如果是流程状态修改那么发送消息给节点人员 foreach (var obj in tbl_project.NodeUser.Split(',')) { WebCommon.Public.WriteAlert(obj, "项目流程通知", "您有一项新的项目流程待处理:" + tbl_project.ProjectName + " " + tbl_project.NodeNo, "views/alert.aspx"); } } int count = new Tbl_ProjectService().UpdateTbl_ProjectById(tbl_project); return(count); }
public static string GetTbl_DesignTasFileFullNamekByTaskId(int TaskID) { //根据任务ID生成文件名 WebModels.Tbl_DesignTask designtask = WebBLL.Tbl_DesignTaskManager.GetTbl_DesignTaskById(TaskID); //生成上传文件名 string RndName = designtask.ProjectNo.ToString() + "-" + designtask.DT_TuHao.ToString();// +"-" + RndNum.ToString(); //获取专业编号 string ClassNo = WebBLL.Tbl_ClassManager.GetDataTableByPage(1, 1, "parentid=15 and classname='" + designtask.ClassName1 + "'", "").Rows[0]["remark"].ToString(); //获取项目资料生成属性 WebModels.Tbl_Project project = WebBLL.Tbl_ProjectManager.GetTbl_ProjectById(designtask.ProjectID); //生成属性文件 string folderpathStr = "../project/" + project.ProjectNo.Trim() + "/" + ClassNo.Trim() + "/" + designtask.DT_TuHao.Trim(); string folderPath = System.Web.HttpContext.Current.Server.MapPath(folderpathStr); if (!System.IO.Directory.Exists(folderPath)) { System.IO.Directory.CreateDirectory(folderPath); } return(folderpathStr + "/" + RndName); }
public static int UpdateTbl_FlowWork(Tbl_FlowWork tbl_flow) { WebCommon.Public.WriteLog("修改工作:" + tbl_flow.WorkName); //如果节点状态更新项目表的节点信息 if (tbl_flow.ProjectID > 0) { WebModels.Tbl_Project project = WebBLL.Tbl_ProjectManager.GetTbl_ProjectById(tbl_flow.ProjectID); if (tbl_flow.Status == "结束") { project.NodeNo = "上传合同"; project.NodeUser = project.ProjectManager; //project.ProjectNo = ""; } else { project.NodeUser = tbl_flow.NodeUser; //project.ProjectNo = ""; } WebBLL.Tbl_ProjectManager.UpdateTbl_Project(project); } tbl_flow.DealUser = WebCommon.Public.GetUserName(); tbl_flow.DealTime = DateTime.Now; return(new Tbl_FlowWorkService().UpdateTbl_FlowWorkById(tbl_flow)); }