private dynamic Updatesrf(HttpContext context) { try { SysLogBll.Create("受让方", "更新受让方操作", adminUser.AdminName); if (dal.Exist(context.Request.Form["JBYhm"].ToString(), context.Request.Form["Id"].ToString())) { return("该用户名已经存在,请重新填写建议用手机号码!"); } else { if (dal.Update(GetModelsrf(context))) { return("更新成功!"); } else { return("更新失败请重新操作! "); } } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return("更新失败请重新操作,错误代码:500 "); } }
// private string GetSelTree(HttpContext context) { try { SysLogBll.Create("组织单位", "返回查询的组织单位树形数据", adminUser.AdminName); string level = string.Empty; try { level = Component.ReadXml("OrgCode").InnerText; } catch { level = "00"; } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("["); dynamic model = dal.GetModel(level); stringBuilder.Append("{\"id\":\"" + model.OrgCode + "\", \"text\":\"" + model.OrgShortName + "\",\"children\":[" + AddNodes(model.OrgCode) + "]}"); stringBuilder.Append(","); if (stringBuilder.Length > 1) { stringBuilder.Remove(stringBuilder.Length - 1, 1); } stringBuilder.Append("]"); return(stringBuilder.ToString()); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(string.Empty); } }
// private string GetLiceTranTree(HttpContext context) { try { SysLogBll.Create("成交", "标成交列表操作", adminUser.AdminName); string BidId = context.Request.QueryString["BidId"]; StringBuilder strb = new StringBuilder(); strb.Append("["); DataTable dataTable = context.Application[BidId] as DataTable; for (int i = 0; i < dataTable.Rows.Count; i++) { strb.Append("{\"id\":\"" + dataTable.Rows[i]["LiceTranId"] + "\", \"text\":\"" + dataTable.Rows[i]["Name"] + "-" + dataTable.Rows[i]["Price"] + "\"}"); if (i < dataTable.Rows.Count - 1) { strb.Append(","); } } strb.Append("]"); return(strb.ToString()); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(string.Empty); } }
// private string Delete(HttpContext context) { try { SysLogBll.Create("系统管理员", "删除系统管理员操作", adminUser.AdminName); if (1 == adminUser.AdminTypeId) { string id = context.Request.QueryString["Id"].ToString(); if (dal.Delete(id)) { return("删除操作成功!"); } else { return("删除失败请重新操作,错误代码:500 "); } } else { return("您没有管理员权限!"); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(string.Empty); } }
// private int SumCount(HttpContext context) { try { SysLogBll.Create("新闻", "获取信息总和", adminUser.AdminName); string sqlWhere = " 1=1 "; string _NewsTitle = context.Request.QueryString["NewsTitle"] as string; string _NewsTypeId = context.Request.QueryString["NewsTypeId"] as string; string _IsCheck = context.Request.QueryString["IsCheck"] as string; if (!string.IsNullOrEmpty(_NewsTitle)) { sqlWhere += string.Format(" and NewsTitle like '{0}%' ", _NewsTitle); } if (!string.IsNullOrEmpty(_NewsTypeId)) { sqlWhere += string.Format(" and NewsTypeId={0}", _NewsTypeId); } if (!string.IsNullOrEmpty(_IsCheck)) { sqlWhere += string.Format(" and IsCheck={0}", _IsCheck); } return(dal.Count(sqlWhere)); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(0); } }
// private string Create(HttpContext context) { try { SysLogBll.Create("出让标", "添加出让标操作", adminUser.AdminName); NCPEP.Bll.T_Bid bllbid = new T_Bid(); //int id = (int)dal.Create(GetModels(context)); int id = (int)bllbid.Add(GetModels(context)); if (id > 0) { TranProcessDal tpd = new TranProcessDal(); if (tpd.Exists(id)) { string column = string.Format("AcceptDate='{0}'", DateTime.Now.ToString()); tpd.Update(column, id); } else { string column = "FK_BidId,AcceptDate"; string values = string.Format("{0},'{1}'", id, DateTime.Now.ToString()); tpd.Create(column, values); } return("添加成功!"); } else { return("添加失败请重新操作! "); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return("添加失败请重新操作,错误代码:500 "); } }
// private dynamic GetAllList(HttpContext context) { try { SysLogBll.Create("意向转出-转入", "意向转出-转入信息列表", adminUser.AdminName); string sqlWhere = " 1=1 "; string Title = context.Request.QueryString["Title"] as string; if (!string.IsNullOrEmpty(Title)) { sqlWhere += string.Format(" and a.Title like '{0}%' ", Title); } int startIndex = 0; try { startIndex = int.Parse(context.Request.Form["page"]) - 1; } catch { } int pageSize = 10; try { pageSize = int.Parse(context.Request.Form["rows"].ToString()); } catch { } string order = string.Format(" order by a.{0} {1}", context.Request.Form["sort"].ToString(), context.Request.Form["order"].ToString()); return(dal.GetAllList(sqlWhere, startIndex, pageSize, order)); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(null); } }
// private string GetComboData(HttpContext context) { try { string OrgCode = context.Request.QueryString["OrgCode"].ToString(); SysLogBll.Create("web出让标", "返回出让标combo数据操作", UserName); StringBuilder strb = new StringBuilder(); strb.Append("["); DataTable dataTable = bidDal.GetAllList(OrgCode); for (int i = 0; i < dataTable.Rows.Count; i++) { strb.Append("{\"id\":\"" + dataTable.Rows[i]["Id"] + "\", \"text\":\"" + dataTable.Rows[i]["BidName"] + "\"}"); if (i < dataTable.Rows.Count - 1) { strb.Append(","); } } strb.Append("]"); return(strb.ToString()); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(string.Empty); } }
// private string Update(HttpContext context) { try { SysLogBll.Create("web出让标", "更新出让标操作", UserName); Bid dModels = GetModels(context); if (dModels.DepaStatus == 1) { if (bidDal.Update(dModels)) { return("更新成功!"); } else { return("更新失败请重新操作! "); } } else { return("出让标信息已经上报无法修改!"); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return("更新失败请重新操作,错误代码:500 "); } }
private string Delete(HttpContext context) { try { SysLogBll.Create("网站会员", "删除网站会员操作", adminUser.AdminName); int id = 0; try { id = int.Parse(context.Request.QueryString["Id"].ToString()); } catch { } WebUserVeri webUser = dal.GetModel(id); if (dal.Delete(id)) { new AuditOpinionDal().Delete(webUser.Id); return("删除操作成功!"); } else { return("删除失败请重新操作,错误代码:500 "); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(string.Empty); } }
// private dynamic GetAllList(HttpContext context) { try { SysLogBll.Create("网站会员", "返回所有网站会员数据", adminUser.AdminName); string sqlWhere = " Veri = 0 "; int startIndex = 0; try { startIndex = int.Parse(context.Request.Form["page"]) - 1; } catch { } int pageSize = 10; try { pageSize = int.Parse(context.Request.Form["rows"].ToString()); } catch { } string order = string.Format(" order by {0} {1}", context.Request.Form["sort"].ToString(), context.Request.Form["order"].ToString()); if (context.Request.QueryString["UserName"] != null) { sqlWhere += string.Format(" and UserName like '%{0}%'", context.Request.QueryString["UserName"]); } return(dal.GetAllList(sqlWhere, startIndex, pageSize, order)); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(null); } }
private string GetLiTrComno(HttpContext context) { try { SysLogBll.Create("web出让/受让方", "返回上传指标类型combo数据操作", UserName); StringBuilder strb = new StringBuilder(); strb.Append("["); DataTable dataTable = null; int LiceTranId = 0; try { LiceTranId = int.Parse(context.Request.QueryString["LiceTranId"]); } catch { } dataTable = dal.GetLiceTranComno(user.Id, LiceTranId); for (int i = 0; i < dataTable.Rows.Count; i++) { strb.Append("{\"id\":\"" + dataTable.Rows[i]["Id"] + "\", \"text\":\"" + dataTable.Rows[i]["Name"] + "\"}"); if (i < dataTable.Rows.Count - 1) { strb.Append(","); } } strb.Append("]"); return(strb.ToString()); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(string.Empty); } }
// private dynamic Delete(HttpContext context) { try { SysLogBll.Create("Web出让/受让方", "删除出让/受让方操作", UserName); int Id = 0; try { Id = int.Parse(context.Request.QueryString["Id"].ToString()); } catch { } /* * if (dal.Delete(Id)) * { * new LiceTranScanDal().Deletes(Id); * new LiceTranCheckDal().Deletes(Id); * Component.DeleteFile("~/Super/Scan/lt/" + Id + "/"); * return "删除成功!"; * } * else * { * return "删除失败请重新操作! "; * } * */ return("暂未开放!"); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return("删除失败请重新操作,错误代码:500 "); } }
// private dynamic GetAllList(HttpContext context) { try { int startIndex = 0; try { startIndex = int.Parse(context.Request.Form["page"]) - 1; } catch { } int pageSize = 10; try { pageSize = int.Parse(context.Request.Form["rows"].ToString()); } catch { } string LiceTranType = "1"; string order = string.Format(" order by {0} {1}", context.Request.Form["sort"].ToString(), context.Request.Form["order"].ToString()); string sqlWhere = string.Format(" FK_WebUserVeriId ={0}", user.Id); if (!string.IsNullOrEmpty(context.Request.QueryString["LiceTranType"] as string)) { LiceTranType = context.Request.QueryString["LiceTranType"]; } sqlWhere += string.Format(" and a.LiceTranType = {0}", LiceTranType); SysLogBll.Create("Web出让/受让方", "查询所有的出让/受让方数据", UserName); return(dal.GetAllList(sqlWhere, startIndex, pageSize, order)); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(null); } }
private dynamic SumCountByDyzt(HttpContext context) { try { SysLogBll.Create("出让标", "获取出让标总和", adminUser.AdminName); string sqlWhere = string.Empty; if (1 == adminUser.IsCheck) { sqlWhere = string.Format(" b.OrgCode like '{0}%' ", adminUser.OrgCode); } else { sqlWhere = string.Format(" b.OrgCode = '{0}' ", adminUser.OrgCode); } if (context.Request.QueryString["BidName"] != null) { sqlWhere += string.Format(" and b.BidName like '%{0}%'", context.Request.QueryString["BidName"]); } string DepaStatus = context.Request.QueryString["DepaStatus"]; sqlWhere += string.Format(" and b.DepaStatus = {0}", DepaStatus); if (context.Request.QueryString["dyzt"] != null) { sqlWhere += " and a.dyzt='" + context.Request.QueryString["dyzt"] + "'"; } return(dal.SumCountByDyzt(sqlWhere)); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(0); } }
// private dynamic GetAllList(HttpContext context) { try { SysLogBll.Create("操作日志", "获取所有的操作日志信息", adminUser.AdminName); string sqlWhere = string.Empty; if (1 == adminUser.AdminTypeId) { sqlWhere = " 1=1 "; } else { sqlWhere = string.Format(" Editor='{0}'", adminUser.AdminName); } int startIndex = 0; int pageSize = 10; try { startIndex = int.Parse(context.Request.Form["page"].ToString()) - 1; } catch (Exception) { } try { pageSize = int.Parse(context.Request.Form["rows"].ToString()); } catch (Exception) { } if (context.Request.QueryString["StateDate"] != null || context.Request.QueryString["EndDate"] != null) { sqlWhere += string.Format(" and CreateDate between '{0} 00:00:00' and '{1} 23:59:59'", context.Request.QueryString["StateDate"], context.Request.QueryString["EndDate"]); } string order = string.Format(" order by {0} {1}", context.Request.Form["sort"].ToString(), context.Request.Form["order"].ToString()); return(dal.GetAllList(sqlWhere, startIndex, pageSize, order)); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(null); } }
// private string Update(HttpContext context) { try { SysLogBll.Create("出让标", "更新出让标操作", adminUser.AdminName); dynamic dModels = GetModels(context); if (dModels.UpManager == 1 || dModels.OrgCode == adminUser.OrgCode) { NCPEP.Bll.T_Bid bll = new T_Bid(); if (bll.Update(dModels)) { return("更新成功!"); } else { return("更新失败请重新操作! "); } } else { return("该标的信息没有提交上级审核!"); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return("更新失败请重新操作,错误代码:500 "); } }
// private dynamic Delete() { try { SysLogBll.Create("操作日志", "删除操作日志信息", adminUser.AdminName); string sqlWhere = string.Empty; if (1 == adminUser.AdminTypeId) { sqlWhere = " 1=1 "; } else { sqlWhere = string.Format(" Editor='{0}'", adminUser.AdminLogName); } DataTable dt = dal.GetAllList(); for (int i = 0; i < dt.Rows.Count; i++) { string mess = "[" + dt.Rows[i]["Id"] + "][" + dt.Rows[i]["LogValue"] + "][" + dt.Rows[i]["Operates"] + "][" + dt.Rows[i]["IpAdd"] + "][" + dt.Rows[i]["MacAdd"] + "][" + dt.Rows[i]["Editor"] + "][" + dt.Rows[i]["CreateDate"] + "]\r\n"; SysLogs(mess); } dal.Delete(); return("清空日志操作成功!"); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return("清空日志操作失败!错误代码:500 "); } }
// private dynamic SumCount(HttpContext context) { try { SysLogBll.Create("出让标", "获取出让标总和", adminUser.AdminName); string sqlWhere = string.Empty; if (1 == adminUser.IsCheck) { sqlWhere = string.Format(" OrgCode like '{0}%' ", adminUser.OrgCode); } else { sqlWhere = string.Format(" OrgCode = '{0}' ", adminUser.OrgCode); } if (context.Request.QueryString["BidName"] != null) { sqlWhere += string.Format(" and BidName like '%{0}%'", context.Request.QueryString["BidName"]); } string DepaStatus = context.Request.QueryString["DepaStatus"]; sqlWhere += string.Format(" and DepaStatus = {0}", DepaStatus); if (!string.IsNullOrEmpty(context.Request.QueryString["bt"])) { sqlWhere += " and a.Id in(select FK_BidId from T_BidTrans where TradingStatus=1)"; } sqlWhere += " and ContractNo != '' and NoAssurance != '' "; return(bidDal.SumCount(sqlWhere)); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(0); } }
// private dynamic SumCount(HttpContext context) { try { SysLogBll.Create("操作日志", "获取操作日志总和数据", adminUser.AdminName); string sqlWhere = string.Empty; if (1 == adminUser.AdminTypeId) { sqlWhere = " 1=1 "; } else { sqlWhere = string.Format(" Editor='{0}'", adminUser.AdminName); } if (context.Request.QueryString["StateDate"] != null || context.Request.QueryString["EndDate"] != null) { sqlWhere = string.Format(" and CreateDate between '{0} 00:00:00' and '{1} 23:59:59'", context.Request.QueryString["StateDate"], context.Request.QueryString["EndDate"]); } return(dal.SumCount(sqlWhere)); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(0); } }
// private string RowsState(HttpContext context) { try { SysLogBll.Create("系统管理员", "更新系统管理员状态操作", adminUser.AdminName); if (1 == adminUser.AdminTypeId) { string row = context.Request.QueryString["Rows"]; string values = context.Request.QueryString["Vale"]; string where = context.Request.QueryString["id"]; string value = (values == "0" ? "1" : "0"); if (dal.UpdateState(row, value, where)) { return("修改权限状态设置成功!"); } else { return("修改权限状态设置失败!"); } } else { return("您没有管理员权限!"); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(string.Empty); } }
// private string GetTree() { try { if (1 == adminUser.AdminTypeId) { SysLogBll.Create("系统菜单", "获取系统菜单树形数据", adminUser.AdminName); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("["); dynamic dataTable = dal.GetAllList("0"); foreach (DataRow rows in dataTable.Rows) { stringBuilder.Append("{\"id\":\"" + rows["NodeId"] + "\", \"text\":\"" + rows["DisplayName"] + "\",\"children\":[" + AddNodes(rows["NodeId"].ToString()) + "]}"); stringBuilder.Append(","); } if (stringBuilder.Length > 1) { stringBuilder.Remove(stringBuilder.Length - 1, 1); } stringBuilder.Append("]"); return(stringBuilder.ToString()); } else { return("[{id:,text: }]"); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return("[{id:,text: }]"); } }
// private dynamic SumCount(HttpContext context) { try { SysLogBll.Create("系统管理员", "获取系统管理员总和", adminUser.AdminName); string sqlWhere = string.Empty; if (1 == adminUser.IsCheck) { sqlWhere = string.Format(" a.OrgCode like '{0}%' ", adminUser.OrgCode); } else { sqlWhere = string.Format(" a.OrgCode = '{0}' ", adminUser.OrgCode); } if (1 == adminUser.AdminTypeId) { if (context.Request.QueryString["AdminLogName"] != null) { sqlWhere += string.Format(" and a.AdminLogName like '%{0}%'", context.Request.QueryString["AdminLogName"]); } } else { sqlWhere += string.Format(" and a.Id = {0}", adminUser.Id); } return(dal.SumCount(sqlWhere)); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(0); } }
// private string Update(HttpContext context) { try { if (1 == adminUser.AdminTypeId) { SysLogBll.Create("系统菜单", "更新系统菜单", adminUser.AdminName); if (dal.Update(GetModels(context))) { return("修改成功!"); } else { return("修改失败请重新操作! "); } } else { return("您没有管理权限!"); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return("修改失败请重新操作,错误代码:500 "); } }
// private string Delete(HttpContext context) { try { int succ = 0; int err = 0; SysLogBll.Create("新闻", "删除新闻信息操作", adminUser.AdminName); string[] idList = context.Request.QueryString["idList"].Split(','); for (int i = 0; i < idList.Length; i++) { int id = int.Parse(idList[i]); News model = dal.GetModel(id); if (dal.Delete(id)) { Component.DeleteImg("~/newsImg/min/" + model.NewsImg); Component.DeleteImg("~/newsImg/max/" + model.NewsImg); Component.DeleteImg("~/newsFile/" + model.NewsFile); succ++; } else { err++; } } return("删除操作成功了[" + succ.ToString() + "]条,失败了[" + err.ToString() + "]条!"); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return("错误代码:500 "); } }
// private dynamic Delete(HttpContext context) { try { SysLogBll.Create("出让/受让方上传附件", "删除出让/受让方上传附件操作", adminUser.AdminName); int Id = 0; try { Id = int.Parse(context.Request.QueryString["Id"].ToString()); } catch { } if (dal.Exists(Id)) { LiceTranScan obj = dal.GetModel(Id); if (dal.Delete(Id)) { Component.DeleteImg("~/Super/Scan/lt/" + obj.FK_LiceTranId + "/" + obj.ScanUrl); return("删除成功!"); } else { return("删除失败请重新操作! "); } } else { return("数据已经开始受理中无法删除操作!"); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return("删除失败请重新操作,错误代码:500 "); } }
// private string GetComboData() { try { SysLogBll.Create("挂牌方式", "返回挂牌方式combo数据操作", adminUser.AdminName); StringBuilder strb = new StringBuilder(); strb.Append("["); DataTable dataTable = dal.GetAllList(); for (int i = 0; i < dataTable.Rows.Count; i++) { strb.Append("{\"id\":\"" + dataTable.Rows[i]["Id"] + "\", \"text\":\"" + dataTable.Rows[i]["StandardModeName"] + "\"}"); if (i < dataTable.Rows.Count - 1) { strb.Append(","); } } strb.Append("]"); return(strb.ToString()); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(string.Empty); } }
// private string Delete(HttpContext context) { try { SysLogBll.Create("出让标", "删除出让标操作", adminUser.AdminName); int UpManager = 0; UpManager = int.Parse(context.Request.QueryString["UpManager"]); string OrgCode = context.Request.QueryString["OrgCode"]; if (UpManager == 1 || OrgCode == adminUser.OrgCode) { int id = 0; try { id = int.Parse(context.Request.QueryString["Id"].ToString()); } catch { } if (dal.Delete(id)) { new BidReturnInfoDal().Delete(id); return("删除操作成功!"); } else { return("删除失败请重新操作,错误代码:500 "); } } else { return("该标的信息没有提交上级审核!"); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(string.Empty); } }
// private string Delete(HttpContext context) { try { SysLogBll.Create("web意向受让标信息", "删除意向受让标信息操作", UserName); int id = 0; try { id = int.Parse(context.Request.QueryString["Id"].ToString()); } catch { } /* * if (bidTransDal.Delete(id)) * { * return "删除操作成功!"; * } * else * { * return "删除失败请重新操作,错误代码:500 "; * } * */ return("暂未开放!"); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(string.Empty); } }
private dynamic SumCount(HttpContext context) { try { string LiceTranType = "1"; SysLogBll.Create("出让/受让方", "获取出让/受让方总和", adminUser.AdminName); string sqlWhere = string.Empty; if (1 == adminUser.IsCheck) { sqlWhere = string.Format(" OrgCode like '{0}%' ", adminUser.OrgCode); } else { sqlWhere = string.Format(" OrgCode = '{0}' ", adminUser.OrgCode); } if (!string.IsNullOrEmpty(context.Request.QueryString["LiceTranType"] as string)) { LiceTranType = context.Request.QueryString["LiceTranType"] as string; } sqlWhere += string.Format(" and LiceTranType = {0}", LiceTranType); string Name = context.Request.QueryString["Name"]; if (!string.IsNullOrEmpty(Name)) { sqlWhere += string.Format(" and Name like '%{0}'", Name); } return(dal.SumCount(sqlWhere)); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(0); } }