public ActionResult Procure_AdSend(公告 model) { if (ModelState.IsValid) { var firstclass = Request.Form["hy"]; var secondclass = Request.Form["secondclass"]; var thirdclass = Request.Form["thirdclass"]; if (firstclass != "请选择行业" && secondclass != "不限") { model.公告信息.一级分类 = firstclass; model.公告信息.二级分类 = secondclass; if (thirdclass != "不限") { model.公告信息.三级分类 = thirdclass; } } var time = Request.Form["publishtime"]; if (!string.IsNullOrEmpty(time)) { try { model.内容主体.发布时间 = Convert.ToDateTime(time); } catch { model.内容主体.发布时间 = DateTime.Now; } } else { model.内容主体.发布时间 = DateTime.Now; } try { if (!string.IsNullOrEmpty(model.内容主体.附件[0])) { var str = model.内容主体.附件[0].Trim(); model.内容主体.附件 = new List<string>(str.Substring(0, str.Length - 1).Split('|')); } else { model.内容主体.附件 = null; } model.审核数据.审核状态 = 审核状态.审核通过; //model.公告信息.一级分类 = Request.Form["hy"]; model.公告信息.所属地域.省份 = Request.Form["deliverprovince"]; model.公告信息.所属地域.城市 = Request.Form["delivercity"]; model.公告信息.所属地域.区县 = Request.Form["deliverarea"]; try { 站内消息 Msg = new 站内消息(); Msg.基本数据.备注 = "此公告于 " + DateTime.Now + " 由 " + currentUser.单位信息.单位名称 + " 提交到 " + currentUser.管理单位.用户数据.单位信息.单位名称; 对话消息 Talk = new 对话消息(); Msg.收信人.用户ID = currentUser.管理单位.用户ID; Msg.发起者.用户ID = currentUser.Id; Talk.发言人.用户ID = currentUser.Id; Msg.消息类型 = 消息类型.公告传递; 站内消息管理.添加站内消息(Msg, Msg.发起者.用户ID, Msg.收信人.用户ID); Talk.消息主体.附件 = model.内容主体.附件; Talk.消息主体.内容 = "公告标题:" + model.内容主体.标题 + "<br />" + "发布时间:" + model.内容主体.发布时间 + "<br />" + "相关行业:" + model.公告信息.一级分类 + "<br />" + "所在地域:" + model.公告信息.所属地域.地域 + "<br />" + "项目名称:" + model.项目信息.项目名称 + "<br />" + "项目编号:" + model.项目信息.项目编号 + "<br />" + "公告类别:" + model.公告信息.公告类别 + "<br />" + "公告性质:" + model.公告信息.公告性质 + "<br />" + "公告版本:" + model.公告信息.公告版本 + "<br />" + "公告内容:" + model.内容主体.内容 + "<br />"; 对话消息管理.添加对话消息(Talk, Msg); } catch { return Content("<script>alert('输入有误!请检查数据格式');location.href='javascript:history.go(-1)';</script>"); } } catch { return Content("<script>alert('输入有误!请检查数据格式');location.href='javascript:history.go(-1)';</script>"); } } return View("Procure_AdSendList_S"); }
public ActionResult Recommend_Expert(int? id) { try { int count = int.Parse(Request.Params["count"]); for (int i = 0; i < count; i++) { 推荐信息 temp = new 推荐信息 { 推荐类型 = 推荐类型.专家, 名称 = Request.Form["name__" + i], 推荐理由 = Request.Form["reason__" + i], 推荐人 = new 用户链接<单位用户> { 用户ID = currentUser.Id }, 联系方式 = new _联系方式 { 联系人 = Request.Form["Cname__" + i], 手机 = Request.Form["tel__" + i], 固定电话 = Request.Form["phonearea__" + i] + "-" + Request.Form["phonenum__" + i] } }; //采购处处长推荐,直接审核通过 if (currentUser.管理单位.用户ID == 10) { temp.推荐审核数据.推荐状态 = 推荐状态.推荐通过; temp.推荐审核数据.审核时间 = DateTime.Now; temp.推荐审核数据.审核者.用户ID = currentUser.Id; } else { //站内消息 站内消息 Msg = new 站内消息(); 对话消息 Talk = new 对话消息(); Msg.重要程度 = 重要程度.特别重要; Msg.消息类型 = 消息类型.推荐专家和供应商; Msg.发起者.用户ID = currentUser.Id; Talk.发言人.用户ID = currentUser.Id; var sendid = 11; Talk.消息主体.标题 = "待审核推荐评审专家"; Talk.消息主体.内容 = "有一条待审核的推荐评审专家未处理,<a style='color:red;text-decoration:underline;' href='/单位用户后台/Recommend_ExpertList_Audit'>点击这里进行审核</a>"; temp.推荐审核数据.推荐状态 = 推荐状态.待联系; temp.推荐审核数据.审核者.用户ID = 11; 站内消息管理.添加站内消息(Msg, currentUser.Id, sendid); 对话消息管理.添加对话消息(Talk, Msg); } 推荐管理.添加推荐信息(temp); } } catch { } return View("Recommend_ExpertList"); }
public ActionResult Procure_TzAdd(Models.数据模型.内容数据模型.通知 model) { if (ModelState.IsValid) { var time = Request.Form["publishtime"]; if (!string.IsNullOrEmpty(time)) { try { model.内容主体.发布时间 = Convert.ToDateTime(time); } catch { model.内容主体.发布时间 = DateTime.Now; } } else { model.内容主体.发布时间 = DateTime.Now; } try { if (!string.IsNullOrWhiteSpace(Request.Form["path"].ToString())) { model.内容主体.附件 = new List<string>(Request.Form["path"].ToString().Substring(0, Request.Form["path"].ToString().Length - 1).Split('|')); } else { model.内容主体.附件 = null; } //新发布的通知进行状态设置, if (currentUser.管理单位.用户ID == 10) { model.审核数据.审核状态 = 审核状态.审核通过; model.审核数据.审核时间 = DateTime.Now; model.审核数据.审核者.用户ID = currentUser.Id; } else { //站内消息 站内消息 Msg = new 站内消息(); 对话消息 Talk = new 对话消息(); Msg.重要程度 = 重要程度.特别重要; Msg.消息类型 = 消息类型.普通; Msg.发起者.用户ID = currentUser.Id; Talk.发言人.用户ID = currentUser.Id; var sendid = 11; Talk.消息主体.标题 = "待审核通知"; Talk.消息主体.内容 = "有一条待审核的通知未处理,<a style='color:red;text-decoration:underline;' href='/单位用户后台/Procure_TzList_Audit'>点击这里进行审核</a>"; model.审核数据.审核状态 = 审核状态.未审核; model.审核数据.审核者.用户ID = 11; 站内消息管理.添加站内消息(Msg, currentUser.Id, sendid); 对话消息管理.添加对话消息(Talk, Msg); } model.内容基本信息.所有者.用户ID = currentUser.Id; 通知管理.添加通知(model); //审核通过,创建Lucene if (model.审核数据.审核状态 == 审核状态.审核通过) { CreateIndex(model, "/Lucene.Net/IndexDic/Tongzhi"); } } catch { return Content("<script>alert('输入有误!请检查数据格式');location.href='javascript:history.go(-1)';</script>"); } } return Content("<script>if(confirm('通知发布成功,点击确定继续发布新通知,点击取消查看')){window.location='/单位用户后台/Procure_TzAdd';}else{window.location='/单位用户后台/Procure_TzList_S';}</script>"); }
public ActionResult Procure_TzModify(Models.数据模型.内容数据模型.通知 model) { if (ModelState.IsValid) { var time = Request.Form["publishtime"]; if (!string.IsNullOrEmpty(time)) { try { model.内容主体.发布时间 = Convert.ToDateTime(time); } catch { } } try { var attachstr = Request.Form["oldPath"].ToString() + Request.Form["path"].ToString(); var deleteattachstr = Request.Form["delPath"]; if (!string.IsNullOrEmpty(deleteattachstr)) { string[] delestr = deleteattachstr.Trim().Split('|'); foreach (var item in delestr) { try { UploadPic.DelPic(string.Format("{0}", item)); } catch { } } } if (!string.IsNullOrEmpty(attachstr)) { attachstr = attachstr.Trim(); model.内容主体.附件 = new List<string>(attachstr.Substring(0, attachstr.Length - 1).Split('|')); } else { model.内容主体.附件 = null; } //新发布的通知进行状态设置, if (currentUser.管理单位.用户ID == 10) { model.审核数据.审核状态 = 审核状态.审核通过; model.审核数据.审核时间 = DateTime.Now; model.审核数据.审核者.用户ID = currentUser.Id; } else { //站内消息 站内消息 Msg = new 站内消息(); 对话消息 Talk = new 对话消息(); Msg.重要程度 = 重要程度.特别重要; Msg.消息类型 = 消息类型.普通; Msg.发起者.用户ID = currentUser.Id; Talk.发言人.用户ID = currentUser.Id; var sendid = 11; Talk.消息主体.标题 = "待审核通知"; Talk.消息主体.内容 = "有一条待审核的通知未处理,<a style='color:red;text-decoration:underline;' href='/单位用户后台/Procure_TzList_Audit'>点击这里进行审核</a>"; model.审核数据.审核状态 = 审核状态.未审核; model.审核数据.审核者.用户ID = 11; 站内消息管理.添加站内消息(Msg, currentUser.Id, sendid); 对话消息管理.添加对话消息(Talk, Msg); } if (model.内容基本信息.所有者.用户ID == -1) { model.内容基本信息.所有者.用户ID = currentUser.Id; } 通知管理.更新通知(model); if (model.审核数据.审核状态 == 审核状态.审核通过) { updateIndex("/Lucene.Net/IndexDic/Tongzhi", model); } else { deleteIndex("/Lucene.Net/IndexDic/Tongzhi", model.Id.ToString()); } } catch { return Content("<script>alert('输入有误!请检查数据格式');location.href='javascript:history.go(-1)';</script>"); } //CreateIndex(model, "/Lucene.Net/IndexDic/GongGao"); } return View("Procure_TzList_S"); }
public ActionResult Procure_AdDetail(string action, Models.数据模型.内容数据模型.公告 g) { 公告 m = 公告管理.查找公告(g.Id); deleteIndex("/Lucene.Net/IndexDic/GongGao", g.Id.ToString()); if (action == "审核通过") { if (currentUser.管理单位.用户ID != 10) { //二级(中间)单位进行审核的代码 m.审核数据2.审核者.用户ID = currentUser.Id; m.审核数据2.审核状态 = 审核状态.审核通过; m.审核数据2.审核时间 = DateTime.Now; //提交给上级单位继续审核 m.审核数据.审核状态 = 审核状态.未审核; m.审核数据.审核者.用户ID = currentUser.管理单位.用户ID; //站内消息 站内消息 Msg = new 站内消息(); 对话消息 Talk = new 对话消息(); Msg.重要程度 = 重要程度.特别重要; Msg.消息类型 = 消息类型.公告传递; Msg.发起者.用户ID = currentUser.Id; Talk.发言人.用户ID = currentUser.Id; 站内消息管理.添加站内消息(Msg, currentUser.Id, currentUser.管理单位.用户ID); Talk.消息主体.标题 = "待审核公告"; Talk.消息主体.内容 = "有一条待审核的公告未处理,<a style='color:red;text-decoration:underline;' href='/单位用户后台/Procure_AdSendList'>点击这里进行审核</a>"; 对话消息管理.添加对话消息(Talk, Msg); 公告管理.更新公告(m, false, false); } else { //最高级(采购处审核后直接发布,创建lucene) m.审核数据.审核者.用户ID = currentUser.Id; m.审核数据.审核状态 = 审核状态.审核通过; m.审核数据.审核时间 = DateTime.Now; 公告管理.更新公告(m, false, false); GG_CreateIndex(公告管理.查找公告(g.Id), "/Lucene.Net/IndexDic/GongGao"); } } else if (action == "审核不通过") { if (currentUser.管理单位.用户ID != 10) { //二级(中间)单位进行审核的代码 m.审核数据2.审核者.用户ID = currentUser.Id; m.审核数据2.审核状态 = 审核状态.审核未通过; m.审核数据2.审核时间 = DateTime.Now; m.审核数据2.未通过理由 = Request.Form["reason"]; m.审核数据.审核者.用户ID = -1; m.审核数据.未通过理由 = ""; 公告管理.更新公告(m, false, false); } else { //最高级 m.审核数据.审核者.用户ID = currentUser.Id; m.审核数据.审核状态 = 审核状态.审核未通过; m.审核数据.审核时间 = DateTime.Now; m.审核数据.未通过理由 = Request.Form["reason"]; 公告管理.更新公告(m, false, false); } } return View("Procure_AdSendList"); }
public ActionResult Procure_AdAdd(公告 model) { //var firstclass = Request.Form["hy"]; //var secondclass = Request.Form["secondclass"]; //var thirdclass = Request.Form["thirdclass"]; //if (firstclass != "请选择行业" && secondclass != "不限") //{ // model.公告信息.一级分类 = firstclass; // model.公告信息.二级分类 = secondclass; // if (thirdclass != "不限") // { // model.公告信息.三级分类 = thirdclass; // } //} //var time = Request.Form["publishtime"]; //var zb_contact = Request.Form["zb_contact"]; //var isybm = Request.Form["isybm"]; //if (!string.IsNullOrEmpty(time)) //{ // try // { // model.内容主体.发布时间 = Convert.ToDateTime(time); // } // catch // { // model.内容主体.发布时间 = DateTime.Now; // } //} //else //{ // model.内容主体.发布时间 = DateTime.Now; //} try { if (!string.IsNullOrWhiteSpace(Request.Form["attachtext"].ToString())) { var str = Request.Form["attachtext"].ToString(); model.内容主体.附件 = new List<string>(str.Split(new[] { "|" }, StringSplitOptions.RemoveEmptyEntries)); } else { model.内容主体.附件 = null; } if (!string.IsNullOrWhiteSpace(Request.Form["attachtext_s"].ToString())) { var str = Request.Form["attachtext_s"].ToString(); model.内容主体.图片 = new List<string>(str.Split(new[] { "|" }, StringSplitOptions.RemoveEmptyEntries)); } else { model.内容主体.图片 = null; } model.内容主体.发布时间 = DateTime.Now; //model.公告信息.一级分类 = Request.Form["hy"]; //model.公告信息.所属地域.省份 = Request.Form["deliverprovince"]; //model.公告信息.所属地域.城市 = Request.Form["delivercity"]; //model.公告信息.所属地域.区县 = Request.Form["deliverarea"]; //赋值公告所有者 model.内容基本信息.所有者.用户ID = currentUser.Id; #if INTRANET //如果是采购处或者更高级别的用户,直接审核通过进行发布,创建lucene(成都采购站,西藏采购站或者采购处及其助理员) if (currentUser.管理单位.用户ID == 10) { model.审核数据.审核状态 = 审核状态.审核通过; model.审核数据.审核时间 = DateTime.Now; model.审核数据.审核者.用户ID = currentUser.Id; //model.审核数据2.审核状态 = 审核状态.审核通过; //model.审核数据2.审核时间 = DateTime.Now; //model.审核数据2.审核者.用户ID = currentUser.Id; model.内容主体.标题 = model.项目信息.项目名称 + "(" + model.项目信息.项目编号 + ")"; model.内容主体.发布时间 = DateTime.Now; 公告管理.添加公告(model); GG_CreateIndex(model, "/Lucene.Net/IndexDic/GongGao"); } else { //站内消息 站内消息 Msg = new 站内消息(); 对话消息 Talk = new 对话消息(); Msg.重要程度 = 重要程度.特别重要; Msg.消息类型 = 消息类型.公告传递; Msg.发起者.用户ID = currentUser.Id; Talk.发言人.用户ID = currentUser.Id; Talk.消息主体.标题 = "待审核公告"; Talk.消息主体.内容 = "有一条待审核的公告未处理,<a style='color:red;text-decoration:underline;' href='/单位用户后台/Procure_AdSendList'>点击这里进行审核</a>"; var sendid = currentUser.Id; //二级单位的公告(昆明采购站,云南采购站,重庆采购站) if (currentUser.管理单位.用户ID == 11) { model.审核数据.审核状态 = 审核状态.未审核; model.审核数据.审核者.用户ID = 11; sendid = 11; } else { //低级单位提交的公告--根据省份提交到各采购站 var p = currentUser.所属地域.省份; switch (p) { case "重庆市": model.审核数据2.审核者.用户ID = 12; model.审核数据2.审核状态 = 审核状态.未审核; sendid = 12; break; case "云南省": model.审核数据2.审核者.用户ID = 13; model.审核数据2.审核状态 = 审核状态.未审核; sendid = 13; break; case "贵州省": model.审核数据2.审核者.用户ID = 14; model.审核数据2.审核状态 = 审核状态.未审核; sendid = 14; break; case "西藏自治区": model.审核数据2.审核者.用户ID = 15; model.审核数据2.审核状态 = 审核状态.未审核; sendid = 15; break; default: model.审核数据2.审核者.用户ID = 16; model.审核数据2.审核状态 = 审核状态.未审核; sendid = 16; break; } } model.内容主体.标题 = model.项目信息.项目名称 + "(" + model.项目信息.项目编号 + ")"; model.内容主体.发布时间 = DateTime.Now; 公告管理.添加公告(model); 站内消息管理.添加站内消息(Msg, currentUser.Id, sendid); 对话消息管理.添加对话消息(Talk, Msg); } #else model.审核数据.审核状态 = 审核状态.未审核; model.内容主体.标题 = model.项目信息.项目名称 + "(" + model.项目信息.项目编号 + ")"; model.内容主体.发布时间 = DateTime.Now; 公告管理.添加公告(model); #endif //if (!string.IsNullOrEmpty(zb_contact)) //{ // try // { // 招标采购项目 z = 招标采购项目管理.查找招标采购项目(int.Parse(zb_contact)); // if (model.公告信息.公告版本 == 公告.公告版本.变更 || model.公告信息.公告版本 == 公告.公告版本.更正 || model.公告信息.公告版本 == 公告.公告版本.补遗) // { // 公告链接 g = new 公告链接(); // g.公告ID = model.Id; // z.修正公告链接.Add(g); // } // switch (model.公告信息.公告性质) // { // case 公告.公告性质.技术公告: // z.技术公告链接.公告ID = model.Id; // break; // case 公告.公告性质.发标公告: // z.招标公告链接.公告ID = model.Id; // break; // case 公告.公告性质.中标公告: // z.中标公告链接.公告ID = model.Id; // break; // case 公告.公告性质.废标公告: // z.废标公告链接.公告ID = model.Id; // break; // case 公告.公告性质.流标公告: // z.流标公告链接.公告ID = model.Id; // break; // default: // break; // } // 招标采购项目管理.更新招标采购项目(z); // } // catch // { // } //} var isybm = Request.Form["isybm"]; if (isybm == "1") { if (model.公告信息.公告性质 == 公告.公告性质.采购公告 && model.公告信息.公告类别 == 公告.公告类别.公开招标) { 招标采购预报名 temp = new 招标采购预报名(); temp.所属公告链接.公告ID = model.Id; 招标采购预报名管理.添加招标采购预报名(temp); } } } catch { return Content("<script>alert('输入有误!请检查数据格式');location.href='javascript:history.go(-1)';</script>"); } return Content("<script>if(confirm('公告添加成功,点击确定继续添加,点击取消查看')){window.location='/单位用户后台/Procure_AdAdd';}else{window.location='/单位用户后台/Procure_AdSendList_S';}</script>"); }
public string ZnxxAdd() { string[] rs = Request.QueryString["r"].ToString().Split(','); for (int i = 0; i < rs.Length - 1; i++) { try { if (用户管理.检查用户是否存在(rs[i]) != -1) { 站内消息 Msg = new 站内消息(); 对话消息 Talk = new 对话消息(); Msg.收信人.用户ID = 用户管理.检查用户是否存在(rs[i]); int level = int.Parse(Request.QueryString["l"]); int mType = int.Parse(Request.QueryString["m"]); switch (level) { case 0: Msg.重要程度 = 重要程度.未指定; break; case 100: Msg.重要程度 = 重要程度.一般; break; case 200: Msg.重要程度 = 重要程度.重要; break; case 300: Msg.重要程度 = 重要程度.特别重要; break; case 400: Msg.重要程度 = 重要程度.必读; break; } switch (mType) { case 0: Msg.消息类型 = 消息类型.未指定; break; case 100: Msg.消息类型 = 消息类型.普通; break; case 200: Msg.消息类型 = 消息类型.采购信息; break; case 300: Msg.消息类型 = 消息类型.推荐专家和供应商; break; } Msg.发起者.用户ID = currentUser.Id; Talk.发言人.用户ID = currentUser.Id; 站内消息管理.添加站内消息(Msg, Msg.发起者.用户ID, Msg.收信人.用户ID); Talk.消息主体.标题 = Request.QueryString["t"]; Talk.消息主体.内容 = Request.QueryString["c"]; 对话消息管理.添加对话消息(Talk, Msg); } } catch { return "发送站内消息失败!"; } } return "发送站内消息成功"; }
public string ZnxxAdd_xy() { IEnumerable<供应商> model = 用户管理.查询用户<供应商>(0, 0, Query<供应商>.Where(m => m.供应商用户信息.协议供应商 == true)); for (int i = 0; i < model.Count(); i++) { try { 站内消息 Msg = new 站内消息(); 对话消息 Talk = new 对话消息(); Msg.收信人.用户ID = model.ElementAt(i).Id; int level = int.Parse(Request.QueryString["l"]); int mType = int.Parse(Request.QueryString["m"]); switch (level) { case 0: Msg.重要程度 = 重要程度.未指定; break; case 100: Msg.重要程度 = 重要程度.一般; break; case 200: Msg.重要程度 = 重要程度.重要; break; case 300: Msg.重要程度 = 重要程度.特别重要; break; case 400: Msg.重要程度 = 重要程度.必读; break; } switch (mType) { case 0: Msg.消息类型 = 消息类型.未指定; break; case 100: Msg.消息类型 = 消息类型.普通; break; case 200: Msg.消息类型 = 消息类型.采购信息; break; case 300: Msg.消息类型 = 消息类型.推荐专家和供应商; break; } Msg.发起者.用户ID = currentUser.Id; Talk.发言人.用户ID = currentUser.Id; 站内消息管理.添加站内消息(Msg, Msg.发起者.用户ID, Msg.收信人.用户ID); Talk.消息主体.标题 = Request.QueryString["t"]; Talk.消息主体.内容 = Request.QueryString["c"]; 对话消息管理.添加对话消息(Talk, Msg); } catch { return "发送站内消息失败!"; } } return "发送站内消息成功"; }
public static bool 更新站内消息(站内消息 message) { return Mongo.更新(message); }
public ActionResult Znxx_Msg_Reply(站内消息 model) { string contents = Request.Form["reply"].ToString(); var item = new 对话消息(); foreach (var m in model.对话消息) { item.发言人.用户ID = currentUser.Id; item.消息主体.标题 = m.消息主体.标题; item.消息主体.内容 = contents; } 对话消息管理.添加对话消息(item, 站内消息管理.查找站内消息(model.Id)); return Content("<script>window.location='/单位用户后台/Procure_Znxx';</script>"); }
public static bool 添加站内消息(站内消息 message, long 发起者ID, long 收信人ID) { message.发起者.用户ID = 发起者ID; message.收信人.用户ID = 收信人ID; return Mongo.添加(message); }
public ActionResult doApplayNewUser() { try { var contact_name = Request.Params["contact_name"]; var contact_tel = Request.Params["contact_tel"]; var contact_unit = Request.Params["contact_unit"]; if (!string.IsNullOrWhiteSpace(contact_tel)) { //站内消息 站内消息 Msg = new 站内消息(); 对话消息 Talk = new 对话消息(); Msg.重要程度 = 重要程度.特别重要; Msg.消息类型 = 消息类型.普通; Msg.发起者.用户ID = 100000000001; Talk.发言人.用户ID = 100000000001; 站内消息管理.添加站内消息(Msg, 100000000001, 100000000001); Talk.消息主体.标题 = "新用户申请"; Talk.消息主体.内容 = "有一个新用户申请未处理,联系人:" + contact_name + ",联系电话:" + contact_tel + ",单位名称或番号:" + contact_unit + "。请及时与联系该用户。"; 对话消息管理.添加对话消息(Talk, Msg); return Content("1"); } else { return Content("联系电话必须填写!"); } } catch { return Content("提交时发生错误,请与管理员联系!"); } }
public ActionResult Expert_Applay(int? id) { 专家抽选记录 model = new 专家抽选记录 { 申请时间 = DateTime.Now, 项目编号 = Request.Form["pro_num"], 项目名称 = Request.Form["pro_name"], 评标时间 = Convert.ToDateTime(Request.Form["pro_time"]), 总计预定抽选专家数 = int.Parse(Request.Form["预定抽选总数"]), 操作人姓名 = Request.Form["prooperate_name"], 操作人电话 = Request.Form["prooperate_tel"] }; model.经办人.用户ID = this.HttpContext.获取当前用户<单位用户>().Id; model.申请抽选状态 = 申请抽选状态.已提交待批准; //屏蔽列表 var outlist = Request.Form["outlistcontent"]; var l = new List<用户链接<专家>>(); if (!string.IsNullOrWhiteSpace(outlist)) { foreach (var item in outlist.Split(new[] { "|" }, StringSplitOptions.RemoveEmptyEntries)) { var z = new 用户链接<专家> { 用户ID = long.Parse(item) }; l.Add(z); } } model.回避专家列表 = l; int count = int.Parse(Request.Form["条件总数"]); var condition = new List<专家抽选记录._专家抽选条件>(); for (int i = 1; i <= count; i++) { var t_condition = new 专家抽选记录._专家抽选条件(); t_condition.需要专家数量 = int.Parse(Request.Form["预定抽选个数__" + i]); //专家类别 var tempparmlist = Request.Form["专家类别__" + i]; if (!string.IsNullOrWhiteSpace(tempparmlist)) { foreach (var temp in tempparmlist.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)) { t_condition.专家类别.Add((专家类别)(int.Parse(temp))); } } //专家级别 tempparmlist = Request.Form["专家级别__" + i]; if (!string.IsNullOrWhiteSpace(tempparmlist)) { foreach (var temp in tempparmlist.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)) { t_condition.专家级别.Add((专家级别)(int.Parse(temp))); } } //专家类型 tempparmlist = Request.Form["专家类型__" + i]; if (!string.IsNullOrWhiteSpace(tempparmlist)) { foreach (var temp in tempparmlist.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)) { t_condition.专家类型.Add((专家类型)(int.Parse(temp))); } } //最高学历 tempparmlist = Request.Form["最高学历__" + i]; if (!string.IsNullOrWhiteSpace(tempparmlist)) { foreach (var temp in tempparmlist.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)) { t_condition.学历要求.Add((学历)(int.Parse(temp))); } } //最高学位 tempparmlist = Request.Form["最高学位__" + i]; if (!string.IsNullOrWhiteSpace(tempparmlist)) { foreach (var temp in tempparmlist.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)) { t_condition.学位要求.Add((学位)(int.Parse(temp))); } } //专业技术职称 tempparmlist = Request.Form["专业技术职称__" + i]; if (!string.IsNullOrWhiteSpace(tempparmlist)) { if (tempparmlist != "-100") { foreach (var temp in tempparmlist.Split(new[] { "|" }, StringSplitOptions.RemoveEmptyEntries)) { t_condition.专业技术职称.Add((专业技术职称)(int.Parse(temp))); } } } //可评标物质类别匹配模式 tempparmlist = Request.Form["可评标物质类别匹配模式__" + i]; if (!string.IsNullOrWhiteSpace(tempparmlist) && tempparmlist == "1") { t_condition.模糊查询 = Request.Form["可评标物质类别__" + i]; } else { //可评标物质类别 tempparmlist = Request.Form["可评标物质类别__" + i]; if (!string.IsNullOrWhiteSpace(tempparmlist)) { var t = new 专家抽选记录._专家抽选条件._评标产品类别(); var 可评标物质类别 = tempparmlist.Split(new[] { "#" }, StringSplitOptions.RemoveEmptyEntries); if (可评标物质类别[1] == "1") { t.二级分类可用专家不足返回一级分类 = true; } else { t.二级分类可用专家不足返回一级分类 = false; } var p = 可评标物质类别[0].Split(new[] { "*" }, StringSplitOptions.RemoveEmptyEntries); t.一级分类 = p[0]; t.二级分类 = new List<string>(); for (var j = 1; j < p.Length; j++) { t.二级分类.Add(p[j]); } t_condition.可评标产品类别.Add(t); } } //抽选描述 t_condition.描述 = Request.Form["抽选描述__" + i]; //所在地域 t_condition.所在地区.省份 = Request.Form["省份__" + i]; t_condition.所在地区.城市 = Request.Form["城市__" + i]; t_condition.所在地区.区县 = Request.Form["区县__" + i]; condition.Add(t_condition); } model.专家抽选条件 = condition; 专家抽选管理.添加专家抽选历史(model); //站内消息 站内消息 Msg = new 站内消息(); 对话消息 Talk = new 对话消息(); Msg.重要程度 = 重要程度.特别重要; Msg.消息类型 = 消息类型.普通; var u_id = this.HttpContext.获取当前用户<单位用户>().Id; Msg.发起者.用户ID = u_id; Talk.发言人.用户ID = u_id; 站内消息管理.添加站内消息(Msg, u_id, 10002); Talk.消息主体.标题 = "待审核抽取评审专家"; Talk.消息主体.内容 = "有一条待审核的申请抽取评审专家未处理,<a style='color:red;text-decoration:underline;' href='/专家抽选/Expert_ApplayAuditList'>点击这里进行审核</a>"; 对话消息管理.添加对话消息(Talk, Msg); if (!string.IsNullOrWhiteSpace(Request.Form["hide"])) { return Redirect("/专家抽选/Expert_Applay_SApp"); } return RedirectToAction("Expert_Applay_S"); }
public ActionResult SendMessage() { if (currentUser.GetType() != typeof(Go81WebApp.Models.数据模型.用户数据模型.供应商)) { return Content("<script>alert('此功能只适用于供应商,如果您是供应商,请先登录');window.location='/登录/Login?ReturnUrl=/jct/Applyvip';</script>"); } else { Regex rg = new Regex(@"\d{2,5}-\d{7,8}|^1[345689][0-9]{9}"); 站内消息 Msg = new 站内消息(); 对话消息 Talk = new 对话消息(); Talk.发言人.用户ID = currentUser.Id; Msg.收信人.用户ID = 100000000001; Msg.重要程度 = 重要程度.一般; Msg.发起者.用户ID = currentUser.Id; 站内消息管理.添加站内消息(Msg, Msg.发起者.用户ID, Msg.收信人.用户ID); Talk.消息主体.标题 = "申请加入军采通会员"; 供应商 model = 用户管理.查找用户<供应商>(currentUser.Id); if (string.IsNullOrWhiteSpace(Request.Form["phone"])) { return Content("<script>alert('请输入手机或电话号码号码,以便我们及时联系您');window.location='/jct/Applyvip?sure=true';</script>"); } else { if (model != null) { Talk.消息主体.内容 = model.企业基本信息.企业名称 + "申请加入军采通会员,申请者联系方式:" + model.企业联系人信息.联系人手机 + "," + model.企业联系人信息.联系人固定电话; 对话消息管理.添加对话消息(Talk, Msg); return Content("<script>alert('您已申请了军采通会员,请等待工作人员的回复!');window.location='/jct/';</script>"); } else { Talk.消息主体.内容 = currentUser.登录信息.登录名 + "申请加入军采通会员,申请者联系方式:" + Request.Form["phone"]; if (rg.IsMatch(Request.Form["phone"].ToString())) { 对话消息管理.添加对话消息(Talk, Msg); return Content("<script>alert('您已申请了军采通会员,请等待工作人员的回复!');window.location='/jct/';</script>"); } else { return Content("<script>alert('请输入正确的联系号码!');window.location='/jct/';</script>"); } } } } }
public string Send_Message() { try { string reciever = Request.QueryString["r"].ToString(); string[] rs = reciever.Split(','); for (int i = 0; i < rs.Length - 1; i++) { if (用户管理.检查用户是否存在(rs[i]) != -1) { 站内消息 Msg = new 站内消息(); 对话消息 Talk = new 对话消息(); Talk.发言人.用户ID = currentUser.Id; Msg.收信人.用户ID = 用户管理.检查用户是否存在(rs[i]); int level = int.Parse(Request.QueryString["l"].ToString()); switch (level) { case 0: Msg.重要程度 = 重要程度.未指定; break; case 100: Msg.重要程度 = 重要程度.一般; break; case 200: Msg.重要程度 = 重要程度.重要; break; case 300: Msg.重要程度 = 重要程度.特别重要; break; case 400: Msg.重要程度 = 重要程度.必读; break; } Msg.发起者.用户ID = currentUser.Id; 站内消息管理.添加站内消息(Msg, Msg.发起者.用户ID, Msg.收信人.用户ID); Talk.消息主体.标题 = Request.QueryString["t"].ToString(); Talk.消息主体.内容 = Request.QueryString["c"].ToString(); 对话消息管理.添加对话消息(Talk, Msg); } } return "添加消息成功!"; } catch { return "添加消息失败!"; } }