예제 #1
0
        /// <summary>
        /// 删除资产
        /// </summary>
        public void DELZCGLMODEL(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int       Id    = int.Parse(P1);
            SZHL_ZCGL model = new SZHL_ZCGLB().GetEntity(d => d.ID == Id && d.ComId == UserInfo.User.ComId);

            model.IsDel = 1;
            new SZHL_ZCGLB().Update(model);
        }
예제 #2
0
        /// <summary>
        /// 生命周期信息
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1">LIFECYCLEID</param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void GETLIFECYCLEMODEL(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int    Id        = int.Parse(P1);
            string strWhere  = " IsDel=0  and ID=" + Id;
            string colNme    = @"* ";
            string tableName = string.Format(@" SZHL_ZCGL_LifeCycle ");

            string    strSql = string.Format("Select {0}  From {1} where {2} ", colNme, tableName, strWhere);
            DataTable dt     = new SZHL_ZCGLB().GetDTByCommand(strSql);

            msg.Result = dt;
        }
예제 #3
0
        /// <summary>
        /// 资产详细信息
        /// </summary>
        public void GETZCGLMODEL(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int    Id        = int.Parse(P1);
            string strWhere  = " z.IsDel=0  and z.ID=" + Id;
            string colNme    = @"z.*, t.Title, l.Title as LocTitle, b.DeptName,u.UserRealName ";
            string tableName = string.Format(@" SZHL_ZCGL z left join SZHL_ZCGL_Type t on z.TypeID=t.ID left join SZHL_ZCGL_Location l on z.LocationID=l.ID left join JH_Auth_Branch b on z.BranchCode=b.DeptCode left join JH_Auth_User u on z.UserName=u.UserName");

            string    strSql = string.Format("Select {0}  From {1} where {2} order by z.CRDate desc", colNme, tableName, strWhere);
            DataTable dt     = new SZHL_ZCGLB().GetDTByCommand(strSql);

            msg.Result = dt;
        }
예제 #4
0
        /// <summary>
        /// 粉丝详情
        /// </summary>
        public void GETFSGLMODEL(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int    Id        = int.Parse(P1);
            string strWhere  = " wu.ID=" + Id;
            string colNme    = @"wu.*, u.UserRealName, u.IsWX, u.mobphone, u.IDCard, u.ToMonoLicense ";
            string tableName = string.Format(@" WX_User wu left join JH_Auth_User u on wu.Openid=u.WXOpenid ");

            string    strSql = string.Format("Select {0}  From {1} where {2} order by wu.CRDate desc", colNme, tableName, strWhere);
            DataTable dt     = new SZHL_ZCGLB().GetDTByCommand(strSql);

            msg.Result = dt;
        }
예제 #5
0
        /// <summary>
        /// 当前用户的资产列表
        /// </summary>
        public void GETZCGLLISTTHISUSER(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            string userName = UserInfo.User.UserName;
            string strWhere = " z.IsDel=0 and z.ComId=" + UserInfo.User.ComId + " and z.UserName='******'";

            string typeid = context.Request["typeid"] ?? "";

            if (typeid != "")
            {
                strWhere += string.Format(" And z.TypeID='{0}' ", typeid);
            }
            string searchstr = context.Request["searchstr"] ?? "";

            searchstr = searchstr.TrimEnd();
            if (searchstr != "")
            {
                strWhere += string.Format(" And ( z.Name like '%{0}%'  or z.Code like '%{0}%')", searchstr);
            }
            int DataID = -1;

            int.TryParse(context.Request.QueryString["ID"] ?? "-1", out DataID);//记录Id
            if (DataID != -1)
            {
                string strIsHasDataQX = new JH_Auth_QY_ModelB().ISHASDATAREADQX("ZCGL", DataID, UserInfo);
                if (strIsHasDataQX == "Y")
                {
                    strWhere += string.Format(" And z.ID = '{0}'", DataID);
                }
            }

            int page      = 0;
            int pagecount = 10;

            int.TryParse(context.Request.QueryString["p"] ?? "1", out page);
            int.TryParse(context.Request.QueryString["pagecount"] ?? "10", out pagecount);//页数
            page = page == 0 ? 1 : page;
            int total = 0;

            DataTable dt = new DataTable();

            dt = new SZHL_ZCGLB().GetDataPager("SZHL_ZCGL z left join SZHL_ZCGL_Type t on z.TypeID=t.ID left join SZHL_ZCGL_Location l on z.LocationID=l.ID left join JH_Auth_User u on z.UserName=u.UserName left join JH_Auth_Branch b on z.BranchCode=b.DeptCode", "z.*, b.DeptName,  u.UserRealName, t.Title, l.Title as LocTitle", pagecount, page, " z.CRDate desc", strWhere, ref total);

            msg.Result  = dt;
            msg.Result1 = total;
        }
예제 #6
0
        /// <summary>
        /// 生命周期新加或者修改后给使用人发送短信
        /// </summary>
        /// <param name="ZCGLID"></param>
        public void SENDZCGLMSG(int ZCGLID)
        {
            SZHL_ZCGL ZC = new SZHL_ZCGLB().GetEntity(d => d.ID == ZCGLID);

            if (ZC != null)
            {
                JH_Auth_User USER = new JH_Auth_UserB().GetEntity(d => d.UserName == ZC.UserName);
                if (USER != null)
                {
                    string phone   = "13980444473";
                    string host    = CommonHelp.GetConfig("HostUrl");
                    string url     = CommonHelp.GetShortUrl(host + "/WX/bgxt/zc_Detail.html?id=" + ZCGLID);
                    string content = ZC.Name + "的生命周期发生变动,请查看" + url;
                    if (phone.Trim().Length > 0)
                    {
                        string message = "尊敬的" + USER.UserRealName.Trim() + "," + content;
                        if (CommonHelp.MarchPhoneNumber(phone))
                        {
                            string MASresult = CommonHelp.SendMAS(phone, message);
                        }
                    }
                }
            }
        }
예제 #7
0
        /// <summary>
        /// 资产列表
        /// </summary>
        public void GETZCGLLIST_PAGE(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int page      = 0;
            int pagecount = 10;

            int.TryParse(context.Request["p"] ?? "1", out page);
            int.TryParse(context.Request["pagecount"] ?? "10", out pagecount);//页数
            page = page == 0 ? 1 : page;
            int total = 0;

            string strWhere = " z.IsDel=0 ";

            string typeid      = context.Request["typeid"] ?? "";
            string branchcode  = context.Request["branchcode"] ?? "";
            string usergw      = context.Request["usergw"] ?? "";
            string locationid  = context.Request["locationid"] ?? "";
            string status      = context.Request["status"] ?? "";
            string lifecycleid = context.Request["lifecycleid"] ?? "";
            string searchstr   = context.Request["searchstr"] ?? "";

            searchstr = searchstr.TrimEnd();

            if (!string.IsNullOrEmpty(typeid))
            {
                strWhere += string.Format(" And z.TypeID='{0}' ", typeid);
            }
            if (!string.IsNullOrEmpty(branchcode))
            {
                strWhere += string.Format(" And z.BranchCode='{0}' ", branchcode);
            }
            if (!string.IsNullOrEmpty(usergw))
            {
                strWhere += string.Format(" And z.UserGW='{0}' ", usergw);
            }
            if (!string.IsNullOrEmpty(locationid))
            {
                strWhere += string.Format(" And z.LocationID='{0}' ", locationid);
            }
            if (!string.IsNullOrEmpty(status))
            {
                strWhere += string.Format(" And z.Status='{0}' ", status);
            }
            if (!string.IsNullOrEmpty(searchstr))
            {
                strWhere += string.Format(" And ( z.Name like '%{0}%'  or z.Code like '%{0}%')", searchstr);
            }
            if (!string.IsNullOrEmpty(lifecycleid))
            {
                strWhere += string.Format("  and z.ID in ( select ZCGLID from SZHL_ZCGL_LifeCycle where TypeID= '{0}' and IsDel=0 )", lifecycleid);
            }
            //int DataID = -1;
            //int.TryParse(context.Request.QueryString["ID"] ?? "-1", out DataID);//记录Id
            //if (DataID != -1)
            //{
            //    string strIsHasDataQX = new JH_Auth_QY_ModelB().ISHASDATAREADQX("ZCGL", DataID, UserInfo);
            //    if (strIsHasDataQX == "Y")
            //    {
            //        strWhere += string.Format(" And z.ID = '{0}'", DataID);
            //    }
            //}

            DataTable dt = new DataTable();

            dt = new SZHL_ZCGLB().GetDataPager("SZHL_ZCGL z left join SZHL_ZCGL_Type t on z.TypeID=t.ID left join SZHL_ZCGL_Location l on z.LocationID=l.ID left join JH_Auth_User u on z.UserName=u.UserName left join  JH_Auth_Branch b on b.DeptCode=z.BranchCode", "z.*, u.UserRealName, t.Title, l.Title as LocTitle, ISNULL(t.AllowLifeCycle,0) as AllowLifeCycle", pagecount, page, "b.DeptShort desc, u.UserRealName asc, z.CRDate desc", strWhere, ref total);

            msg.Result  = dt;
            msg.Result1 = total;
        }