public string HookUpCompanyAndUser(int SingleProjectID, int UserID, int RoleID, int CompanyID, string ProjectType, string UserName, string CompanyType) { string flag = SystemSet._RETURN_SUCCESS_VALUE; try { PublicModel.AddSingleProjectUser(SingleProjectID, RoleID, UserID); //加入到工程用户表中去 PublicModel.AddSingleProjectCompany(SingleProjectID, CompanyID); //加入到工程公司表中去 } catch (Exception ex) { flag = SystemSet._RETURN_FAILURE_VALUE + ex.Message; Common.LogUtil.Debug(this, "工程相关表关联(工程用户表,工程公司表)", ex); } return(flag); }
public void Execute(string singleProjectID, string companyID, string companyID2, bool flagType) { if (flagType) { DeleteSingleProjectCompany(singleProjectID, "AJCompanyInfo"); DeleteSingleProjectCompany(singleProjectID, "ZJCompanyInfo"); PublicModel.AddSingleProjectCompany(ConvertEx.ToInt(singleProjectID), ConvertEx.ToInt(companyID)); //安监单位 PublicModel.AddSingleProjectCompany(ConvertEx.ToInt(singleProjectID), ConvertEx.ToInt(companyID2)); //质监单位 PublicModel.AddSingleProjectUser(ConvertEx.ToInt(singleProjectID), GetUserInfoMdl(companyID)); PublicModel.AddSingleProjectUser(ConvertEx.ToInt(singleProjectID), GetUserInfoMdl(companyID2)); } else { DeleteSingleProjectCompany(singleProjectID, "JCCompanyInfo"); PublicModel.AddSingleProjectCompany(ConvertEx.ToInt(singleProjectID), ConvertEx.ToInt(companyID)); //检测单位 PublicModel.AddSingleProjectUser(ConvertEx.ToInt(singleProjectID), GetUserInfoMdl(companyID)); } }
public string HookUpCompanyAndUser(int SingleProjectID, int UserID, int RoleID, int CompanyID, string ProjectType, string UserName, string CompanyType) { string flag = SystemSet._RETURN_SUCCESS_VALUE; try { string iSignaturePdf = "0"; //文件是否需要签章 string iSignatureWorkFlow = "0"; //是否按签章流程签章 if (ConvertEx.ToBool(SystemSet._ISIGNATUREPDF)) { iSignaturePdf = "1"; iSignatureWorkFlow = "1"; } PublicModel.AddSingleProjectUser(SingleProjectID, RoleID, UserID); //加入到工程用户表中去 PublicModel.AddSingleProjectCompany(SingleProjectID, CompanyID); //加入到工程公司表中去 userOper.CopyFileList(CompanyID, UserID, UserName, SingleProjectID, ProjectType, CompanyType, iSignaturePdf, iSignatureWorkFlow); //用户添加归档目录 #region 关联更新工程表的 施工,监理单位信息 T_SingleProject_MDL singleMDL = singleBLL.GetModel(SingleProjectID); T_Company_MDL companyMDL = companyBLL.GetModel(CompanyID); if (singleMDL != null && companyMDL != null) { if (ConvertEx.ToInt(CompanyType) == SystemSet._SGCOMPANYINFO) { singleMDL.sgdw = companyMDL.CompanyName; } else if (ConvertEx.ToInt(CompanyType) == SystemSet._JLCOMPANYINFO) { singleMDL.jldw = companyMDL.CompanyName; } singleBLL.Update(singleMDL); } #endregion } catch (Exception ex) { flag = SystemSet._RETURN_FAILURE_VALUE + ex.Message; Common.LogUtil.Debug(this, "工程相关表关联(工程用户表,工程公司表)", ex); } return(flag); }