public ActionResult Part_Gys_ApplayCancelApp(int? id) { 供应商抽选记录 model = new 供应商抽选记录(); if (id != null) { model = 供应商抽选管理.查找供应商抽选历史记录((long)id); } return PartialView("/Views/默认主题/后台/单位用户后台/Procure_Part/Part_Gys_ApplayCancelApp.cshtml", model); }
public ActionResult GysChoose(int? id) { 供应商抽选记录 model = new 供应商抽选记录(); try { model = 供应商抽选管理.查找供应商抽选历史记录((long)id); } catch { return Content("<script>alert('页面有误');location.href='javascript:history.go(-1)';</script>"); } int count = 0; int.TryParse(Request.Form["turncount"], out count); for (int i = 0; i < count; i++) { var flag = true; _地域 place = new _地域 { 省份 = Request.Form["deliverprovince___" + i], 城市 = Request.Form["delivercity___" + i], 区县 = Request.Form["deliverarea___" + i] }; if (string.IsNullOrEmpty(Request.Form["deliverprovince___" + i])) { place.省份 = "不限"; place.城市 = "不限"; place.区县 = "不限"; } ////model.专家抽选轮次[i].从事专业 = Request.Form["从事专业__" + i]; ////model.专家抽选轮次[i].专业技术职称 = (专业技术职称)int.Parse(Request.Form["专业技术职称___" + i]); ////model.专家抽选轮次[i].屏蔽列表 = Request.Form["回避列表__" + i]; //model.供应商抽选轮次[i].所在地区 = place; //model.供应商抽选轮次[i].预定抽选供应商数 = int.Parse(Request.Form["抽取个数__" + i]); ////model.专家抽选轮次[i].专家类别 = (专家类别)int.Parse(Request.Form["专家类别___" + i]); ////model.专家抽选轮次[i].专家类型 = (专家类型)int.Parse(Request.Form["专家类型___" + i]); ////model.专家抽选轮次[i].最低要求学位 = (学位)int.Parse(Request.Form["最高学位___" + i]); //model.供应商抽选轮次[i].所属行业 = Request.Form["hy___" + i]; string str = Request.Form["historyturn__" + i]; //str "1|2014-07-24 09:57:29|^1|146|1^2|116|1^3|131|1^4|113|0,88888888888^5|132|0,666666666^6|156|1^7|106|1^8|150|1^%2|2014-07-24 09:57:47|^9|136|1^10|151|0,9999^%3|2014-07-24 09:57:53|^11|145|1^%" string[] a1 = str.Substring(0, str.Length - 1).Split('%'); for (int aj = 0; aj < a1.Length; aj++) { //if (a1[aj].Substring(0, a1[aj].Length - 1).Split('^')[1] == "isnot_enough") //{ // model.供应商抽选轮次[i].本轮抽选结果 = 本轮供应商抽选结果.可用供应商数量不足; // if (i == 0) // { // operatetime = a1[0].Split('|')[1]; // } // flag = false; //} } if (flag) { //model.供应商抽选轮次[i].本轮抽选结果 = 本轮供应商抽选结果.正常; ////a1[i] 1|2014-07-24 09:57:29|^1|146|1^2|116|1^3|131|1^4|113|0,88888888888^5|132|0,666666666^6|156|1^7|106|1^8|150|1^ ////a1[i] 2|2014-07-24 09:57:47|^9|136|1^10|151|0,9999^ //foreach (var item in a1) //{ // _供应商抽选批次 numlist = new _供应商抽选批次(); // string[] a2 = item.Substring(0, item.Length - 1).Split('^'); // //a2[0] 1|2014-07-24 09:57:29| a2[i] 4|113|0,88888888888 1|146|1 // string[] numstr = a2[0].Split('|'); // //historylist.抽取批次 = int.Parse(numstr.Split('|')[0]); // numlist.抽选批次 = int.Parse(numstr[0]); // numlist.抽选时间 = Convert.ToDateTime(numstr[1]); // for (int j = 1; j < a2.Length; j++) // { // string[] a3 = a2[j].Split('|'); // 供应商 zj = new 供应商(); // zj = 用户管理.查找用户<供应商>(long.Parse(a3[1])); // int 序号 = int.Parse(a3[0]); // bool 预定出席 = true; // string 不能出席原因 = ""; // if (a3[2] != "1") // { // 预定出席 = false; // 不能出席原因 = a3[2].Substring(2, a3[2].Length - 2); // } // _供应商抽选条目 historylist = new _供应商抽选条目() // { // 不能出席原因 = 不能出席原因, // 联系方式 = zj.联系方式.手机 + "," + zj.联系方式.固定电话, // 所在地区 = zj.所属地域, // //性别 = zj.身份信息.性别, // //姓名 = zj.身份信息.姓名, // 序号 = 序号, // 预定出席 = 预定出席, // //证件号 = zj.身份信息.证件号, // //证件类型 = zj.身份信息.证件类型, // //专家类别 = zj.身份信息.专家类别, // //专业技术职称 = zj.学历信息.专业技术职称, // //最高学历 = zj.学历信息.最高学历, // //最高学位 = zj.学历信息.最高学位, // //从事专业 = zj.工作经历信息.从事专业, // //专家类型 = zj.身份信息.专家类型 // }; // historylist.供应商.用户ID = zj.Id; // numlist.供应商列表.Add(historylist); // } // model.供应商抽选轮次[i].供应商抽选批次.Add(numlist); //} } } model.申请抽选状态 = 申请抽选状态.已完成抽选; //model.操作人.用户ID = this.HttpContext.获取当前用户<单位用户>().Id; //if (string.IsNullOrEmpty(operatetime)) //{ // model.操作时间 = model.供应商抽选轮次[0].供应商抽选批次[0].抽选时间; //} //else //{ // model.操作时间 = Convert.ToDateTime(operatetime); //} //model.确认人.用户ID = this.HttpContext.获取当前用户<单位用户>().Id; model.确认时间 = DateTime.Now; 供应商抽选管理.更新供应商抽选历史记录(model); return View("/Views/默认主题/后台/单位用户后台/GysChoose_ApplayAuditListApp.cshtml"); }
public ActionResult Part_GysChooseApp(int? id) { 供应商抽选记录 model = new 供应商抽选记录(); try { model = 供应商抽选管理.查找供应商抽选历史记录((long)id); var str = ""; foreach (var m in model.供应商抽选条件) { str += m.需要供应商数量 + ","; } ViewData["抽取总数列表"] = str.Substring(0, str.Length - 1); } catch { return Content("<script>alert('页面有误');location.href='javascript:history.go(-1)';</script>"); } return PartialView("/Views/默认主题/后台/单位用户后台/Procure_Part/Part_GysChooseApp.cshtml", model); }
public ActionResult GysChoose_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)) { 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]; //所在地域 var place = new _地域 { 省份 = Request.Form["省份__" + i], 城市 = Request.Form["城市__" + i], 区县 = Request.Form["区县__" + i] }; t_condition.所在地区.Add(place); condition.Add(t_condition); } model.供应商抽选条件 = condition; 供应商抽选管理.添加供应商抽选历史(model); if (!string.IsNullOrWhiteSpace(Request.Form["app"])) { return RedirectToAction("GysChoose_Applay_SApp"); } return RedirectToAction("GysChoose_Applay_S"); }
public static bool 更新供应商抽选历史记录(供应商抽选记录 p) { return Mongo.更新(p); }
public static bool 添加供应商抽选历史(供应商抽选记录 record) { return Mongo.添加(record); }