// private dynamic SumCount(HttpContext context) { try { string sqlWhere = string.Format(" OrgCode={0}", adminUser.OrgCode); 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 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]["TurnOutTypeName"] + "\"}"); 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 GetAllList(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 a.NewsTitle like '{0}%' ", _NewsTitle); } if (!string.IsNullOrEmpty(_NewsTypeId)) { sqlWhere += string.Format(" and a.NewsTypeId={0}", _NewsTypeId); } if (!string.IsNullOrEmpty(_IsCheck)) { sqlWhere += string.Format(" and a.IsCheck={0}", _IsCheck); } 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 dynamic GetAllList(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); //} 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()); 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.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); } }
public string ProcessRequest(HttpContext context) { try { adminUser = context.Session["SuperAdminUserSession"] as AdminUser; if (null == adminUser) { if (!string.IsNullOrEmpty(context.Request.Cookies["AdminCookies"].Value)) { adminUser = new GetUserCookiesPlug().GetUserCookies(context.Request.Cookies["AdminCookies"]["SuperAdminUserCookies"]); context.Session["SuperAdminUserSession"] = adminUser; } } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(null); } string action = context.Request.QueryString["action"].ToString(); string returnDate = string.Empty; switch (action) { case "paging": returnDate = JsonHelper <TurnOutType> .JsonDataTable(GetAllList(context), "rows"); break; case "add": returnDate = Create(context); break; case "up": returnDate = Update(context); break; case "combo": returnDate = GetComboData(); break; case "by": returnDate = JsonHelper <TurnOutType> .JsonWriter(GetById(context)); break; default: returnDate = "请求错误!"; break; } return(returnDate); }
// private string Create(HttpContext context) { try { int err = 0; int succ = 0; SysLogBll.Create("系统管理员", "增加系统管理员操作", adminUser.AdminName); AdminUser model = GetModel(context); int id = (int)dal.CreateScalar(model); if (id > 0) { dynamic role = null; DataTable dt = new PermissionsDal().GetAllList(model.AdminTypeId); roleDal.Delete(id); foreach (dynamic row in dt.Rows) { role = new RolePermissions(); role.AdminUserId = id; role.SysFunId = int.Parse(row["SysFunId"].ToString()); role.Editor = adminUser.AdminLogName; if (roleDal.Create(role)) { succ++; } else { err++; } } return("添加成功!— 授权操作成功了[" + succ.ToString() + "]条,失败了[" + err.ToString() + "]条!"); } 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); 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 dynamic GetAllList() { try { SysLogBll.Create("新闻类型", "返回所有数据", adminUser.AdminName); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("["); return(dal.GetAllList()); } 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 DataTable GetBiddingCar(HttpContext context) { try { DataTable dt = null; string Id = context.Request.QueryString["Id"]; if (null != context.Application[Id]) { dt = context.Application[Id] as DataTable; } else { dt = new BidCarData().CreateBidCar(); } return(dt); } 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 Create(HttpContext context) { try { SysLogBll.Create("指标对应关系", "创建指标对应关系操作", adminUser.AdminName); IndicatorsRelations model = null; int err = 0; int succ = 0; string ApplicationType = context.Request.QueryString["ApplicationType"]; string FK_MemberTypeCertificationId = context.Request.QueryString["FK_MemberTypeCertificationId"]; Delete(ApplicationType, FK_MemberTypeCertificationId); string[] SysFunId = context.Request.QueryString["FunId"].ToString().Split('|'); for (int i = 0; i < SysFunId.Length - 1; i++) { model = new IndicatorsRelations(); model.ApplicationType = int.Parse(ApplicationType); model.FK_TypeIndicatorNameId = int.Parse(SysFunId[i].ToString()); model.FK_MemberTypeCertificationId = int.Parse(FK_MemberTypeCertificationId); model.Editor = adminUser.AdminLogName; if (dal.Create(model)) { 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 "); } }
// public string UploadImg(string url, int index) { try { string strFileName = DateTime.Now.ToString("yyyyMMddhhmmss"); HttpPostedFile hf = HttpContext.Current.Request.Files[index]; if (hf.ContentLength > 0) { int fileSize = 0; fileSize = hf.ContentLength; if (fileSize < 2097152) { string fileType = Path.GetExtension(hf.FileName); if (".exe" != fileType || ".EXE" != fileType) { if (!Directory.Exists(HttpContext.Current.Server.MapPath(url))) { Directory.CreateDirectory(HttpContext.Current.Server.MapPath(url)); } string path = HttpContext.Current.Server.MapPath(url + strFileName + fileType); hf.SaveAs(path); return(strFileName + fileType); } } return(string.Empty); } else { return(string.Empty); } } 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 DataTable GetAllList(HttpContext context) { try { SysLogBll.Create("指标对应关系", "获取所有的指标对应关系操作", adminUser.AdminName); string ApplicationType = context.Request.QueryString["ApplicationType"]; string FK_MemberTypeCertificationId = context.Request.QueryString["FK_MemberTypeCertificationId"]; return(dal.GetAllList(ApplicationType, FK_MemberTypeCertificationId)); } 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 void Delete(string ApplicationType, string FK_MemberTypeCertificationId) { try { SysLogBll.Create("指标对应关系", "删除指标对应关系操作", adminUser.AdminName); dal.Delete(ApplicationType, FK_MemberTypeCertificationId); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); } }
private DataTable GetAllList(HttpContext context) { try { SysLogBll.Create("纠纷仲裁", "获取所有的纠纷仲裁操作", adminUser.AdminName); string sqlWhere = string.Format(" a.OrgCode={0}", adminUser.OrgCode); 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()); 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 DataTable GetBidReturnInfoList(HttpContext context) { try { SysLogBll.Create("web标审核返回信息", "获取标审核返回信息操作", UserName); int BidId = 0; try { BidId = int.Parse(context.Request.QueryString["BidId"]); } catch { } return(new BidReturnInfoDal().GetAllList(BidId)); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(null); } }
// public string ProcessRequest(HttpContext context) { try { user = context.Session["UserSession"] as WebUserVeri; if (null == user) { if (!string.IsNullOrEmpty(context.Request.Cookies["UserCookies"].Value)) { user = new GetUserCookiesPlug().GetVeriUserCookies(context.Request.Cookies["UserCookies"]["UserSession"]); context.Session["UserSession"] = user; } } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); context.Response.Write("非法请求!"); } UserName = !string.IsNullOrEmpty(user.UserName) ? user.UserName : user.VeriName; string action = context.Request.QueryString["action"].ToString(); string returnDate = string.Empty; switch (action) { case "one": returnDate = OneBidTrans(context); break; case "two": returnDate = ""; break; case "list": returnDate = JsonHelper <BidAuction> .JsonDataTable(GetBiddingCar(context)); break; default: returnDate = "请求错误!"; break; } return(returnDate); }
// private string GetAdminLogName(HttpContext context) { try { AdminUser adminUser = context.Session["SuperAdminUserSession"] as AdminUser; return(adminUser.AdminLogName); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return("Administrator"); } }
// private string OneBidTrans(HttpContext context) { try { string BidName = context.Request.QueryString["BidName"]; string BidId = context.Request.QueryString["BidId"]; string LiceTranId = context.Request.QueryString["LiceTranId"]; string SeveralBid = context.Request.QueryString["SeveralBid"]; string Price = context.Request.QueryString["Price"]; string Name = context.Request.QueryString["Name"]; string[] strArray = new string[] { BidId, LiceTranId, SeveralBid, Price, BidName, Name, UserName }; DataTable dt = null; if (null != context.Application[BidId]) { dt = context.Application[BidId] as DataTable; if (0 != dt.Rows.Count) { int lt = (int)dt.Compute("Count(LiceTranId)", string.Format("LiceTranId={0}", LiceTranId)); if (0 == lt) { new BidCarData().AddBidCar(dt, strArray); return("投标成功"); } else { return("您已经投过标了!"); } } else { new BidCarData().AddBidCar(dt, strArray); 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(null); } }
// 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 Create(HttpContext context) { try { SysLogBll.Create("产权交易鉴证书打印理由", "添加产权交易鉴证书打印理由操作", adminUser.AdminName); if (dal.Create(GetModels(context))) { string binid = context.Request.QueryString["id"]; DataTable dt = new DataTable(); NCPEP.Bll.T_Dyzt blldyzt = new T_Dyzt(); dt = blldyzt.GetList(" binid='" + binid + "'").Tables[0]; if (dt.Rows.Count > 0) { try { string dyzt = dt.Rows[0]["dyzt"].ToString(); if (dyzt != "1" && dyzt != "4") { return("2"); } } catch { } } else { NCPEP.Model.T_Dyzt modeldyzt = new Model.T_Dyzt(); modeldyzt.binid = binid; modeldyzt.dyzt = "1"; blldyzt.Add(modeldyzt); } //打印申请 NCPEP.Bll.T_Dysq blldysq = new T_Dysq(); DataTable dtdysq = blldysq.GetList("fid='" + binid + "' order by id desc").Tables[0]; if (dtdysq.Rows.Count > 0) { int dysqcs = int.Parse(dtdysq.Rows[0]["dycs"].ToString()); int dyzcs = dysqcs * 3; NCPEP.Bll.T_Dyjl blldyjl = new T_Dyjl(); DataTable dtdyjl = blldyjl.GetList("fid='" + binid + "'").Tables[0]; if (dtdyjl.Rows.Count >= dyzcs) { return("1"); } else { NCPEP.Model.T_Dyjl modeldyjl = new Model.T_Dyjl(); modeldyjl.dyr = adminUser.AdminName; modeldyjl.dysj = DateTime.Now.ToString(); modeldyjl.dysqid = "1";//暂时不用 modeldyjl.fid = binid; blldyjl.Add(modeldyjl); } } else { NCPEP.Model.T_Dysq modeldysq = new Model.T_Dysq(); modeldysq.dycs = "1"; modeldysq.dysqnr = "第一次打印"; modeldysq.dysqsj = DateTime.Now.ToString("yyyy-MM-dd"); modeldysq.dyzt = "1"; modeldysq.fid = binid; blldysq.Add(modeldysq); } return("OK"); } 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 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 Sqs(HttpContext context) { try { SysLogBll.Create("产权交易鉴证书再次申请", "产权交易鉴证书再次申请", adminUser.AdminName); string binid = context.Request["pid"].ToString(); DataTable dt = new DataTable(); NCPEP.Bll.T_Dyzt blldyzt = new T_Dyzt(); dt = blldyzt.GetList(" binid='" + binid + "'").Tables[0]; if (dt.Rows.Count > 0) { string strdyzt = dt.Rows[0]["dyzt"].ToString(); if (strdyzt != "1" && strdyzt != "4") { return("2"); } //打印申请 NCPEP.Bll.T_Dysq blldysq = new T_Dysq(); DataTable dtdysq = blldysq.GetList("fid='" + binid + "' order by id desc").Tables[0]; if (dtdysq.Rows.Count > 0) { int dysqcs = int.Parse(dtdysq.Rows[0]["dycs"].ToString()); int dyzcs = dysqcs * 3; NCPEP.Bll.T_Dyjl blldyjl = new T_Dyjl(); DataTable dtdyjl = blldyjl.GetList("fid='" + binid + "'").Tables[0]; if (dtdyjl.Rows.Count >= dyzcs) { return("OK"); } else { return("1"); } } else { return("1"); } } else { return("1"); } } 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 DataTable GetAllList(HttpContext context) { try { SysLogBll.Create("转出方式", "获取所有的转出方式操作", adminUser.AdminName); string sort = context.Request.Form["sort"]; string order = context.Request.Form["order"]; return(dal.GetAllList(sort, 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 GetLiceTranScanList(HttpContext context) { try { int LiceTranId = 0; LiceTranId = int.Parse(context.Request.QueryString["LiceTranId"]); SysLogBll.Create("web出让/受让方上传附件", "查询所有的出让/受让方上传附件数据", UserName); return(new LiceTranScanDal().GetAllList(LiceTranId)); } 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 GetById(HttpContext context) { try { SysLogBll.Create("转出方式", "返回单个转出方式信息操作", adminUser.AdminName); int id = 0; try { id = int.Parse(context.Request.QueryString["Id"]); } catch { } return(dal.GetModel(id)); } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(null); } }
// public string ProcessRequest(HttpContext context) { try { user = context.Session["UserSession"] as WebUserVeri; if (null == user) { if (!string.IsNullOrEmpty(context.Request.Cookies["UserCookies"].Value)) { user = new GetUserCookiesPlug().GetVeriUserCookies(context.Request.Cookies["UserCookies"]["UserSession"]); context.Session["UserSession"] = user; } } } catch (Exception ex) { SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]"); return(null); } UserName = !string.IsNullOrEmpty(user.UserName) ? user.UserName : user.VeriName; string action = context.Request.QueryString["action"].ToString(); string returnDate = string.Empty; switch (action) { case "LiTrScanpaging": returnDate = JsonHelper <LiceTranScan> .JsonDataTable(GetLiceTranScanList(context), "rows"); break; case "bidInfopaging": returnDate = JsonHelper <BidReturnInfo> .JsonDataTable(GetBidReturnInfoList(context), "rows"); break; case "TranProcessby": returnDate = JsonHelper <TranProcess> .JsonWriter(GetById(context)); break; default: returnDate = "请求错误!"; break; } return(returnDate); }
// 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 dynamic GetById(HttpContext context) { try { SysLogBll.Create("web标信息审核流程", "返回单个标信息审核流程", UserName); int BidId = 0; try { BidId = int.Parse(context.Request.QueryString["BidId"]); } catch { } return(new TranProcessDal().GetModel(BidId)); } 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); if (dal.Update(GetModel(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 Delete(HttpContext context) { try { SysLogBll.Create("意向转出-转入", "删除意向转出-转入信息操作", adminUser.AdminName); int Id = 0; try { Id = int.Parse(context.Request.QueryString["Id"]); } catch { } if (dal.Delete(Id)) { 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 "); } }