Beispiel #1
0
 //
 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);
     }
 }
Beispiel #2
0
 //
 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);
     }
 }
Beispiel #3
0
 //
 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);
     }
 }
Beispiel #4
0
 //
 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);
     }
 }
Beispiel #5
0
        //
        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 BidConNo(HttpContext context)
 {
     try
     {
         string Id         = context.Request.QueryString["Id"];
         int    ContractNo = bidDal.GetMaxContractNo();
         string orgcode    = adminUser.OrgCode.ToString().Length == 6 ? adminUser.OrgCode : adminUser.OrgCode + "00";
         string ContNo     = orgcode + DateTime.Now.Year.ToString() + ContractNo.ToString().PadLeft(6, '0');
         string rows       = string.Format(" ContractDate = '{0}',ContractNo='{1}'", DateTime.Now, ContNo);
         string where = string.Format(" Id = {0} ", Id);
         if (bidDal.UpdateState(rows, where))
         {
             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("生成失败,505错误!");
     }
 }
Beispiel #7
0
        //
        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);
            }
        }
Beispiel #8
0
 //
 private string GetSelAddress(HttpContext context)
 {
     try
     {
         string         url     = "http://apis.baidu.com/chazhao/ipsearch/ipsearch";
         string         ip      = context.Request.QueryString["Ip"] as string;
         string         param   = string.Format("ip={0}", ip);
         string         strURL  = url + '?' + param;
         HttpWebRequest request = (HttpWebRequest)WebRequest.Create(strURL);
         request.Method = "GET";
         request.Headers.Add("apikey", "778b1d20cd69be9bd621235a9cfe6b9c");
         HttpWebResponse response = (HttpWebResponse)request.GetResponse();
         Stream          stream   = response.GetResponseStream();
         string          StrDate  = string.Empty;
         string          strValue = string.Empty;
         StreamReader    Reader   = new StreamReader(stream, Encoding.UTF8);
         while ((StrDate = Reader.ReadLine()) != null)
         {
             strValue += StrDate + "\r\n";
         }
         return(strValue);
     }
     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);
     }
 }
Beispiel #9
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);
     }
 }
Beispiel #10
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);
     }
 }
Beispiel #11
0
 //
 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 ");
     }
 }
Beispiel #12
0
 private string KSJJ(HttpContext context)
 {
     try
     {
         string          jjsj  = context.Request.QueryString["jjsj"];
         string          BidId = context.Request.QueryString["bid"];
         string          qbjg  = context.Request.QueryString["qpjg"];
         Model.T_Bid     model = new Model.T_Bid();
         NCPEP.Dal.T_Bid dal   = new Dal.T_Bid();
         model        = dal.GetModel(int.Parse(BidId));
         model.Jbjzsj = System.DateTime.Now.AddMinutes(double.Parse(jjsj)).ToString();
         model.Jbqbj  = qbjg;
         model.Jbzt   = "1";
         if (dal.Update(model))
         {
             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("成交失败!");
     }
 }
Beispiel #13
0
 //
 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 ");
     }
 }
Beispiel #14
0
 //
 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);
     }
 }
Beispiel #15
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 ");
     }
 }
Beispiel #16
0
 //
 private dynamic Create(HttpContext context)
 {
     try
     {
         dynamic CheckCode    = context.Request.Cookies["TelCode"]["TelCodeCookies"];
         dynamic CheckCode1   = context.Session["TelCode"];
         string  CheckTelCode = context.Request.Form["CheckTelCode"].ToString();
         if (CheckTelCode.ToUpper().Equals(CheckCode.ToUpper()))
         {
             if (webUserDal.Create(GetModel(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 ");
     }
 }
Beispiel #17
0
        //
        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;
                    }
                }
                UserName = !string.IsNullOrEmpty(user.UserName) ? user.UserName : user.VeriName;
            }
            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 "UsById":
                returnDate = JsonHelper <WebUserVeri> .JsonWriter(GetUsersById());

                break;

            case "membertypecombo":
                returnDate = GetMemberTypeComboData();
                break;

            case "userup":
                returnDate = UserUpdate(context);
                break;

            case "orgtree":
                returnDate = GetOrgTree();
                break;

            case "veriuserbyid":
                returnDate = GetVeriUserById();
                break;

            case "out":
                returnDate = LoginOut(context);
                break;

            case "veriuserup":
                returnDate = VeriUserUpdate(context);
                break;

            default:
                returnDate = "请求错误!";
                break;
            }
            return(returnDate);
        }
Beispiel #18
0
 //
 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(" 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);
            }
        }
Beispiel #20
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 ");
     }
 }
Beispiel #21
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);
     }
 }
Beispiel #22
0
 //
 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 ");
     }
 }
Beispiel #23
0
 //
 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);
     }
 }
Beispiel #24
0
 //
 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);
     }
 }
Beispiel #25
0
 //
 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 ");
     }
 }
Beispiel #26
0
        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);
            }
        }
Beispiel #27
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]["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);
            }
        }
Beispiel #28
0
 //
 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 ");
     }
 }
Beispiel #29
0
        //
        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);
            }
        }
Beispiel #30
0
 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);
     }
 }