public ActionResult BidDetail(string pid) { ViewBag.SecondMenu = MenuHelper.GetSecondMenu("Bidings", Session["RoleId"].ToString()); if (pid == null) { return(View("Login")); } ViewBag.pid = pid; BidContext bc = new BidContext(); DataTable dt = bc.GetBidDetail(pid); DataRow dr = dt.Rows[0]; ViewBag.Name = dr["Name"].ToString(); ViewBag.Location = dr["Location"].ToString(); ViewBag.Content = dr["Content"].ToString(); ViewBag.Type = dr["ProjType"].ToString(); ViewBag.Publisher = dr["Publisher"].ToString(); ViewBag.BidingNum = dr["BidingNum"].ToString(); ViewBag.ApplyDate = dr["ApplyDate"].ToString(); ViewBag.OpenDate = dr["OpenDate"].ToString(); ViewBag.ProjDescription = dr["ProDescription"].ToString(); ViewBag.Content = dr["Content"].ToString(); //单位反馈 dt = bc.GetBidingCompanys(pid); var joinC = (from c in dt.AsEnumerable() where c.Field <int>("CompanyResponse") == 1 select new { id = c["id"].ToString(), name = c["Name"].ToString() }).ToList(); var noJoinC = (from c in dt.AsEnumerable() where c.Field <int>("CompanyResponse") == 2 select new { id = c["id"].ToString(), name = c["Name"].ToString() }).ToList(); var noResponseC = (from c in dt.AsEnumerable() where c.Field <int>("CompanyResponse") == 0 select new { id = c["id"].ToString(), name = c["Name"].ToString() }).ToList(); ViewBag.joinNum = joinC.Count; ViewBag.noJoinNum = noJoinC.Count; ViewBag.noResponseNum = noResponseC.Count; StringBuilder cHtml = new StringBuilder(); foreach (var c in joinC) { cHtml.Append("<span><a href='/Companys/Details?id=" + c.id + "' target='_blank'>" + c.name + "</a></span>"); } ViewBag.JoinCompanys = cHtml.ToString(); cHtml.Clear(); foreach (var c in noJoinC) { cHtml.Append("<span><a href='/Companys/Details?id=" + c.id + "' target='_blank'>" + c.name + "</a></span>"); } ViewBag.NoJoinCompanys = cHtml.ToString(); cHtml.Clear(); foreach (var c in noResponseC) { cHtml.Append("<span><a href='/Companys/Details?id=" + c.id + "' target='_blank'>" + c.name + "</a></span>"); } ViewBag.NoResponseCompanys = cHtml.ToString(); return(View()); }
public string GetBidDetail(string pid) { BidContext bc = new BidContext(); DataTable dt = bc.GetBidDetail(pid); return(JsonHelper.DataTableToJSON(dt)); }
public ActionResult BidingApplicationDetail(string bid) { if (bid == null) { return(View("/Login")); } BidContext bc = new BidContext(); DataTable dt = bc.GetBidDetail(bid); DataRow dr = dt.Rows[0]; ViewBag.Name = dr["Name"].ToString(); ViewBag.Location = dr["Location"].ToString(); ViewBag.Content = dr["Content"].ToString(); ViewBag.Type = dr["Type"].ToString(); ViewBag.Publisher = dr["Publisher"].ToString(); ViewBag.BidingNum = dr["BidingNum"].ToString(); ViewBag.ApplyDate = dr["ApplyDate"].ToString(); ViewBag.OpenDate = dr["OpenDate"].ToString(); ViewBag.PublishDate = dr["PublishDate"].ToString(); ViewBag.ProjDescription = dr["ProjDescription"].ToString(); dt = bc.GetBidingCompanys(bid); var joinC = (from c in dt.AsEnumerable() where c.Field <int>("CompanyResponse") == 1 select new { name = c["CompanyName"].ToString() }).ToList(); var noJoinC = (from c in dt.AsEnumerable() where c.Field <int>("CompanyResponse") == 2 select new { name = c["CompanyName"].ToString() }).ToList(); var noResponseC = (from c in dt.AsEnumerable() where c.Field <int>("CompanyResponse") == 0 select new { name = c["CompanyName"].ToString() }).ToList(); ViewBag.joinNum = joinC.Count; ViewBag.noJoinNum = noJoinC.Count; ViewBag.noResponseNum = noResponseC.Count; StringBuilder cHtml = new StringBuilder(); foreach (var c in joinC) { cHtml.Append("<span>" + c.name + "</span>"); } ViewBag.JoinCompanys = cHtml.ToString(); cHtml.Clear(); foreach (var c in noJoinC) { cHtml.Append("<span>" + c.name + "</span>"); } ViewBag.NoJoinCompanys = cHtml.ToString(); cHtml.Clear(); foreach (var c in noResponseC) { cHtml.Append("<span>" + c.name + "</span>"); } ViewBag.NoResponseCompanys = cHtml.ToString(); return(View()); }
public ActionResult BidingApproveDetail(string pid) { ViewBag.ProjId = pid; ViewBag.UserId = Session["UserId"].ToString(); ViewBag.RoleId = Session["RoleId"].ToString(); ViewBag.status = Request["status"].ToString(); if (pid == null) { return(View("/Login")); } ViewBag.pid = pid; BidContext bc = new BidContext(); DataTable dt = bc.GetBidDetail(pid); DataRow dr = dt.Rows[0]; ViewBag.Name = dr["Name"].ToString(); ViewBag.Location = dr["Location"].ToString(); ViewBag.Content = dr["Content"].ToString(); ViewBag.Type = dr["ProjType"].ToString(); ViewBag.Publisher = dr["Publisher"].ToString(); ViewBag.BidingNum = dr["BidingNum"].ToString(); ViewBag.ApplyDate = dr["ApplyDate"].ToString(); ViewBag.OpenDate = dr["OpenDate"].ToString(); ViewBag.PublishDate = dr["PublishDate"].ToString(); ViewBag.ProjDescription = dr["ProDescription"].ToString(); ViewBag.Content = dr["Content"].ToString(); //单位反馈 dt = bc.GetBidingCompanys(pid); var joinC = (from c in dt.AsEnumerable() where c.Field <int>("CompanyResponse") == 1 select new { id = c["id"].ToString(), name = c["Name"].ToString() }).ToList(); var noJoinC = (from c in dt.AsEnumerable() where c.Field <int>("CompanyResponse") == 2 select new { id = c["id"].ToString(), name = c["Name"].ToString() }).ToList(); var noResponseC = (from c in dt.AsEnumerable() where c.Field <int>("CompanyResponse") == 0 select new { id = c["id"].ToString(), name = c["Name"].ToString() }).ToList(); //单位反馈-单位显示框 StringBuilder comHtml = new StringBuilder(); foreach (var c in joinC) { comHtml.Append("<span><a href='/Companys/Details?id=" + c.id + "' target='_blank' >" + c.name + "</a></span>"); } ViewBag.JoinCompanys = comHtml.ToString(); comHtml.Clear(); foreach (var c in noJoinC) { comHtml.Append("<span><a href='/Companys/Details?id=" + c.id + "' target='_blank'>" + c.name + "</a></span>"); } ViewBag.NoJoinCompanys = comHtml.ToString(); comHtml.Clear(); foreach (var c in noResponseC) { comHtml.Append("<span><a href='/Companys/Details?id=" + c.id + "' target='_blank'>" + c.name + "</a></span>"); } ViewBag.NoResponseCompanys = comHtml.ToString(); StringBuilder cHtml = new StringBuilder(); if (Session["RoleId"].ToString() == "2") { if (Request["status"].ToString() == "1") { string removebtn = ""; removebtn = "<i><img src='/img/icon-del.png' onclick=\"removeCompany('{0}')\"></i>"; ViewBag.InviteCompanyBtn = @"<a href='javascript:;' class='js-cancle-meet' id='invitebtn' onclick='inviteCompanys()' title='邀标'><i class='meet-icon icon-cancel icon-yb'>邀标</i></a>"; ViewBag.addCompanysbtn = "<tr class='form-tr detail-user-con tr-border ifortd'>" + "<td class='form-lable label2'>" + "<span style ='color:#008cd6' > 参与单位:</span>" + "</td>" + "<td>" + "<div class='detail-user'>" + //"<button type='submit' style=''>" + "<a href='#' onclick=\"ShowDiv()\" class='add-qy' style='width: 80px;color: #fff'>" + "<img src='/img/icon-add3.png' style='vertical-align: middle' alt=''>添加企业" + "</a>" + //"</button>" + "</div>" + "</td >" + "</tr>"; //参与单位-单位显示框 dt = bc.GetBidingCompanys(pid); cHtml.Append("<tr class='form-tr detail-user-con invitejoincom'><td colspan='2'><div class='detail-user-list1' style='overflow: auto;'><div class='meet-user-span' id='inviteCompany'>"); for (int i = 0; i < dt.Rows.Count; i++) { var cid = "company" + dt.Rows[i]["id"].ToString(); cHtml.Append("<span id='" + cid + "'><a href='/Companys/Details?id=" + dt.Rows[i]["id"].ToString() + "' target='_blank'>" + dt.Rows[i]["Name"].ToString() + "</a>" + string.Format(removebtn, cid) + "</span>"); } cHtml.Append(@"</div></div></td></tr>"); ViewBag.inviteJoinCompanys = cHtml.ToString(); } else { ViewBag.InviteCompanyBtn = ""; ViewBag.addCompanysbtn = " <tr class='form-tr detail-user-con tr-border ifortd'>" + "<td class='form-lable label2'>" + "<span style ='color:#008cd6' > 参与单位:</span>" + "</td>" + "<td>" + "<div class='detail-user'>" + "</div>" + "</td >" + "</tr>"; //参与单位-单位显示框 dt = bc.GetBidingCompanys(pid); cHtml.Append("<tr class='form-tr detail-user-con invitejoincom'><td colspan='2'><div class='detail-user-list1' style='overflow: auto;'><div class='meet-user-span' id='inviteCompany'>"); for (int i = 0; i < dt.Rows.Count; i++) { var cid = "company" + dt.Rows[i]["id"].ToString(); cHtml.Append("<span id='" + cid + "'>" + dt.Rows[i]["Name"].ToString() + "</span>"); } cHtml.Append(@"</div></div></td></tr>"); ViewBag.inviteJoinCompanys = cHtml.ToString(); } ViewBag.comjion = @"<tr class='form-tr detail-user-con tr-border ifortd'>" + "<td class='form-lable label2'>" + "<span style = 'color: #008cd6'> 单位反馈:</span>" + "</td>" + "<td>" + "<div class='detail-user'>" + "<a class='meet-btn medium-btn active'>参加<span>" + joinC.Count + "</span></a>" + "<a class='meet-btn medium-btn'>不参加<span>" + noJoinC.Count + "</span></a>" + "<a class='meet-btn medium-btn'>未响应<span>" + noResponseC.Count + "</span></a>" + "</div>" + "</td>" + "</tr>"; ViewBag.ResponseCompanysHtml = @"<tr class='form-tr detail-user-con'>" + "<td colspan ='2' >" + "<div class='detail-user-list detail-user-list6' style='overflow: auto;'>" + "<div class='meet-user-span' style='display: block;'>" + ViewBag.JoinCompanys + "</div>" + "<div class='meet-user-span'>" + ViewBag.NoJoinCompanys + "</div>" + "<div class='meet-user-span'>" + ViewBag.NoResponseCompanys + "</div>" + "</div>" + "</td>" + "</tr>"; } else if (Session["RoleId"].ToString() == "1" || Session["RoleId"].ToString() == "3") { //参与单位-单位显示框 dt = bc.GetBidingCompanys(pid); cHtml.Append("<tr class='form-tr detail-user-con invitejoincom'><td colspan='2'><div class='detail-user-list1' style='overflow: auto;'><div class='meet-user-span' id='inviteCompany'>"); for (int i = 0; i < dt.Rows.Count; i++) { var cid = "company" + dt.Rows[i]["id"].ToString(); cHtml.Append("<span id='" + cid + "'>" + dt.Rows[i]["Name"].ToString() + "</span>"); } cHtml.Append(@"</div></div></td></tr>"); ViewBag.inviteJoinCompanys = cHtml.ToString(); ViewBag.InviteCompanyBtn = ""; ViewBag.addCompanysbtn = "<tr class='form-tr detail-user-con tr-border ifortd'>" + "<td class='form-lable label2'>" + "<span style ='color:#008cd6' > 参与单位:</span>" + "</td>" + "<td>" + "<div class='detail-user'>" + "</div>" + "</td >" + "</tr>"; ViewBag.comjion = @"<tr class='form-tr detail-user-con tr-border ifortd'>" + "<td class='form-lable label2'>" + "<span style = 'color: #008cd6'> 单位反馈:</span>" + "</td>" + "<td>" + "<div class='detail-user'>" + "<a class='meet-btn medium-btn active'>参加<span>" + joinC.Count + "</span></a>" + "<a class='meet-btn medium-btn'>不参加<span>" + noJoinC.Count + "</span></a>" + "<a class='meet-btn medium-btn'>未响应<span>" + noResponseC.Count + "</span></a>" + "</div>" + "</td>" + "</tr>"; ViewBag.ResponseCompanysHtml = @"<tr class='form-tr detail-user-con'>" + "<td colspan ='2' >" + "<div class='detail-user-list detail-user-list6' style='overflow: auto;'>" + "<div class='meet-user-span' style='display: block;'>" + ViewBag.JoinCompanys + "</div>" + "<div class='meet-user-span'>" + ViewBag.NoJoinCompanys + "</div>" + "<div class='meet-user-span'>" + ViewBag.NoResponseCompanys + "</div>" + "</div>" + "</td>" + "</tr>"; } else { ViewBag.inviteJoinCompanys = ""; ViewBag.InviteCompanyBtn = ""; ViewBag.addCompanysbtn = ""; ViewBag.comjion = ""; ViewBag.ResponseCompanysHtml = ""; } //判断审核通过按钮显示与隐藏 //if (Session["RoleId"].ToString() == "2") //{ // if (joinC.Count < 5){ // ViewBag.approvebtn = ""; // }else // { // ViewBag.approvebtn = @"<div class='deal-apply-btn deal-apply-btn2'> // <a class='meet-btn big-btn blue-btn js-deal green-btn blue-btn2' onclick='approveApplication()'>审核通过</a> // </div>"; // } //}else //{ ViewBag.approvebtn = @"<div class='deal-apply-btn deal-apply-btn2'> <a class='meet-btn big-btn blue-btn js-deal green-btn blue-btn2' onclick='approveApplication()'>审核通过</a> </div>"; //} return(View()); }
// GET: MobileBid //[VerifyMobileLoginFilter] public ActionResult Index(string pid) { if (!string.IsNullOrEmpty(Request["lcode"])) { string code = Request["lcode"].ToString(); ViewBag.UserId = Request["userid"].ToString(); SqlParameter[] paras = new SqlParameter[2]; paras[0] = new SqlParameter("@uid", ViewBag.UserId); paras[1] = new SqlParameter("@code", code); string s = DBHelper.ExecuteSP("CheckLoginStatus", paras).Tables[0].Rows[0][0].ToString(); if (s == "1") { Session["UserId"] = Request["userid"].ToString(); } else { Response.Redirect("/MobileLogin"); } } else if (Session["UserId"] != null) { ViewBag.UserId = Session["UserId"].ToString(); } else { Response.Redirect("/MobileLogin"); } if (pid == null) { return(View("\\MobileLogin")); } ViewBag.pid = pid; BidContext bc = new BidContext(); DataTable dt = bc.GetBidDetail(pid); DataRow dr = dt.Rows[0]; ViewBag.Name = dr["Name"].ToString(); ViewBag.Location = dr["Location"].ToString(); ViewBag.Content = dr["Content"].ToString(); ViewBag.Type = dr["ProjType"].ToString(); ViewBag.Publisher = dr["Publisher"].ToString(); ViewBag.BidingNum = dr["BidingNum"].ToString(); ViewBag.ApplyDate = dr["ApplyDate"].ToString(); ViewBag.OpenDate = dr["OpenDate"].ToString(); ViewBag.PublishDate = dr["PublishDate"].ToString(); ViewBag.ProjDescription = dr["ProDescription"].ToString(); ViewBag.Content = dr["Content"].ToString(); if (Session["RoleId"].ToString() == "2" && Request["status"].ToString() == "1") { ViewBag.InviteCompanyBtn = @"<a href='javascript:;' class='js-cancle-meet' id='invitebtn' onclick='inviteCompanys()' title='邀标'><i class='meet-icon icon-cancel icon-yb'>邀标</i></a>"; ViewBag.addCompanysbtn = "<button type='submit' class='add-qy' style='width: 80px;'>" + "<a href='#' onclick=\"ShowDiv('MyDiv','fade')\" style='color: #fff'>" + "<img src='/img/icon-add3.png' style='vertical-align: middle' alt=''>添加企业" + "</a></button>"; } else { ViewBag.InviteCompanyBtn = ""; ViewBag.addCompanysbtn = ""; } //单位反馈 dt = bc.GetBidingCompanys(pid); var joinC = (from c in dt.AsEnumerable() where c.Field <int>("CompanyResponse") == 1 select new { id = c["id"].ToString(), name = c["Name"].ToString() }).ToList(); //单位反馈-单位显示框 StringBuilder comHtml = new StringBuilder(); foreach (var c in joinC) { comHtml.Append("<li id='" + c.id + "'>" + c.name + "</li>"); } ViewBag.JoinCompanys = comHtml.ToString(); return(View()); }