Example #1
0
 //
 private dynamic Update(HttpContext context)
 {
     try
     {
         SysLogBll.Create("Web出让/受让方", "更新出让/受让方操作", UserName);
         if (dal.Update(GetModels(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 ");
     }
 }
Example #2
0
 //
 private DataTable GetList(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 { }
         SysLogBll.Create("web出让标", "获取所有的出让标操作", UserName);
         string order = string.Format(" order by a.{0} {1}", context.Request.Form["sort"].ToString(), context.Request.Form["order"].ToString());
         return(bidDal.GetList(user.Id, 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);
     }
 }
Example #3
0
 //
 private dynamic SumCount(HttpContext context)
 {
     try
     {
         string LiceTranType = "1";
         SysLogBll.Create("Web出让/受让方", "获取出让/受让方总和", UserName);
         string sqlWhere = string.Format(" FK_WebUserVeriId ={0}", user.Id);
         if (!string.IsNullOrEmpty(context.Request.QueryString["LiceTranType"] as string))
         {
             LiceTranType = context.Request.QueryString["LiceTranType"] as string;
         }
         sqlWhere += string.Format(" and LiceTranType = {0}", LiceTranType);
         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);
     }
 }
Example #4
0
 private dynamic Createsrf(HttpContext context)
 {
     try
     {
         SysLogBll.Create("受让方", "增加出让/受让方操作", adminUser.AdminName);
         if (context.Request.Form["JBYhm"] != null)
         {
             if (dal.Exist(context.Request.Form["JBYhm"].ToString()))
             {
                 return("该用户名已经存在,请重新填写建议用手机号码!");
             }
             else
             {
                 if (dal.Create(GetModelsrf(context)))
                 {
                     return("添加成功!");
                 }
                 else
                 {
                     return("添加失败请重新操作! ");
                 }
             }
         }
         else
         {
             if (dal.Create(GetModels(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 ");
     }
 }
Example #5
0
 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 OrgCode = context.Request.QueryString["OrgCode"];
         string order   = string.Format(" order by a.{0} {1}", context.Request.Form["sort"].ToString(), context.Request.Form["order"].ToString());
         SysLogBll.Create("通讯录", "查询所有的通讯录数据", adminUser.AdminName);
         return(dal.GetAllList(OrgCode, 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);
     }
 }
Example #6
0
 //
 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.Empty;
         //if (1 == adminUser.IsCheck)
         //{
         sqlWhere += string.Format(" a.OrgCode like '{0}%' ", adminUser.OrgCode);
         //}
         //else
         //{
         //    sqlWhere += string.Format(" a.OrgCode = '{0}'  ", adminUser.OrgCode);
         //}
         if (!string.IsNullOrEmpty(context.Request.QueryString["LiceTranId"] as string))
         {
             LiceTranType = context.Request.QueryString["LiceTranId"];
         }
         sqlWhere += string.Format(" and a.LiceTranType = {0}", LiceTranType);
         string Name = context.Request.QueryString["Name"];
         if (!string.IsNullOrEmpty(Name))
         {
             sqlWhere += string.Format(" and a.Name like '%{0}%'", Name);
         }
         SysLogBll.Create("出让/受让方", "查询所有的出让/受让方数据", adminUser.AdminName);
         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);
     }
 }
Example #7
0
 //
 private string LiTrCheckCreate(HttpContext context)
 {
     try
     {
         SysLogBll.Create("出让/受让方", "出让/受让方审核操作", adminUser.AdminName);
         LiceTranCheck ltc = new LiceTranCheck();
         ltc.AuditDate     = DateTime.Now;
         ltc.AuditSay      = context.Request.QueryString["AuditSay"];
         ltc.FK_LiceTranId = int.Parse(context.Request.QueryString["FK_LiceTranId"]);
         ltc.Reviewer      = adminUser.AdminName;
         //if (0 == dal.GetComnoData(ltc.FK_LiceTranId).Rows.Count)
         //{
         if (new LiceTranCheckDal().Create(ltc))
         {
             if (dal.UpdateState("AuditType", "1", ltc.FK_LiceTranId))
             {
                 return("审核意见添加成功,审核操作完成。");
             }
             else
             {
                 return("审核意见添加成功,审核操作没有完成!");
             }
         }
         else
         {
             return("审核意见添加失败,审核操作未完成!");
         }
         //}
         //else
         //{
         //    return "出让,受让方需要上传的扫描件没有上传全面还有[" + dal.GetComnoData(ltc.FK_LiceTranId).Rows.Count.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);
     }
 }
Example #8
0
        //
        private string Delete(HttpContext context)
        {
            try
            {
                SysLogBll.Create("web出让标", "删除出让标操作", UserName);
                int UpManager = 0;
                UpManager = int.Parse(context.Request.QueryString["UpManager"]);
                string OrgCode = context.Request.QueryString["OrgCode"];

                int id = 0;
                try { id = int.Parse(context.Request.QueryString["Id"].ToString()); }
                catch { }
                Bid modl = bidDal.GetModel(id);
                if (modl.DepaStatus == 1)
                {
                    if (bidDal.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);
            }
        }
Example #9
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 private string Create(HttpContext context)
 {
     try
     {
         SysLogBll.Create("系统授权", "创建系统授权", adminUser.AdminName);
         string mess        = "SystemError!";
         int    succ        = 0;
         int    error       = 0;
         int    AdminTypeId = 0;
         AdminTypeId = int.Parse(context.Request.QueryString["AdminTypeId"].ToString());
         string[] SysFunIdArray = context.Request.QueryString["SysFunId"].Split('|');
         dal.Delete(AdminTypeId);
         for (int i = 0; i < SysFunIdArray.Length; i++)
         {
             Permissions model = new Permissions();
             model.AdminTypeId = AdminTypeId;
             model.Editor      = adminUser.AdminLogName;
             model.SysFunId    = Convert.ToInt32(SysFunIdArray[i]);
             if (dal.Create(model))
             {
                 succ++;
             }
             else
             {
                 error++;
             }
         }
         mess = string.Format("授予权限成功了[{0}]条,失败了[{1}]条!", succ, error);
         return(mess);
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return(null);
     }
 }
Example #10
0
 //
 private string Create(HttpContext context)
 {
     try
     {
         SysLogBll.Create("用户权限", "创建用户权限操作", adminUser.AdminName);
         RolePermissions model       = null;
         int             err         = 0;
         int             succ        = 0;
         int             AdminUserId = 0;
         try { AdminUserId = int.Parse(context.Request.QueryString["AdminUserId"]); }
         catch { }
         Delete(AdminUserId);
         string[] SysFunId = context.Request.QueryString["SysFunId"].ToString().Split('|');
         for (int i = 0; i < SysFunId.Length - 1; i++)
         {
             model             = new RolePermissions();
             model.AdminUserId = AdminUserId;
             model.SysFunId    = int.Parse(SysFunId[i].ToString());
             model.Editor      = adminUser.AdminName;
             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 ");
     }
 }
Example #11
0
        //
        private string GetSysFun()
        {
            try
            {
                SysLogBll.Create("系统后台主页面", "用户登录获取权限列表", adminUser.AdminName);
                int           parentNodeId  = 0;
                StringBuilder stringBuilder = new StringBuilder();
                stringBuilder.Append("[");

                DataTable dataTable = new DataTable();
                if (adminUser.Id == 1)
                {
                    dataTable = new RolePermissionsBll().GetAllList(0);
                }
                else
                {
                    //dataTable = new RolePermissionsBll().GetAllList(adminUser.Id, parentNodeId);
                    dataTable = new RolePermissionsBll().GetFunListByRole(adminUser.Id, parentNodeId);
                }
                for (int i = 1; i < dataTable.Rows.Count + 1; i++)
                {
                    stringBuilder.Append("{\"menuid\":\"" + dataTable.Rows[i - 1]["NodeId"] + "\",\"menuname\":\"" + dataTable.Rows[i - 1]["DisplayName"] + "\",\"menus\":" + AddMenusNodes(int.Parse(dataTable.Rows[i - 1]["NodeId"].ToString())) + "}");
                    if (i < dataTable.Rows.Count)
                    {
                        stringBuilder.Append(",");
                    }
                }
                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);
            }
        }