/// <summary>
 /// 设置代理商分配的通道
 /// </summary>
 public void SetManagerSpgates()
 {
     if (object.Equals(null, Request.Form["ports"]) ||
         object.Equals(null, Request.Form["userid"])
         )
     {
         Response.Write("{success:false,errorInfo:'非法操作'}");
         return;
     }
     string strSpgates = Request.Form["ports"].ToString();
     string strUserID = Request.Form["userid"].ToString();
     int iIndex = strSpgates.LastIndexOf(',');
     if (iIndex > 0)
     {
         strSpgates = strSpgates.Substring(0, iIndex);
     }
     //变更数据库
     SmsServer.BLL.SmsManager bll = new SmsServer.BLL.SmsManager();
     if (bll.SetSpgates(strUserID, strSpgates))
     {
         Response.Write("{success:true}");
     }
     else //失败
     {
         Response.Write("{success:false,errorInfo:'后台错误'}");
     }
 }
 /// <summary>
 /// ����Ȩ��
 /// </summary>
 public void SetPower()
 {
     if (object.Equals(null, Request.Form["power"]) ||
         object.Equals(null, Request.Form["userid"])
         )
     {
         Response.Write("{success:false,errorInfo:'�Ƿ�����'}");
         return;
     }
     string strPower = Request.Form["power"].ToString();
     string strUserID = Request.Form["userid"].ToString();
     int iIndex = strPower.LastIndexOf(',');
     if (iIndex > 0)
     {
         strPower = strPower.Substring(0, iIndex);
     }
     //������ݿ�
     SmsServer.BLL.SmsManager manager = new SmsServer.BLL.SmsManager();
     if (manager.SetPower(strUserID, strPower))
     {
         Response.Write("{success:true}");
     }
     else //ʧ��
     {
         Response.Write("{success:false,errorInfo:'��̨����'}");
     }
 }
Esempio n. 3
0
        /// <summary>
        /// 设置代理商分配的通道
        /// </summary>
        public void SetManagerSpgates()
        {
            if (object.Equals(null, Request.Form["ports"]) ||
                object.Equals(null, Request.Form["userid"])
                )
            {
                Response.Write("{success:false,errorInfo:'非法操作'}");
                return;
            }
            string strSpgates = Request.Form["ports"].ToString();
            string strUserID  = Request.Form["userid"].ToString();
            int    iIndex     = strSpgates.LastIndexOf(',');

            if (iIndex > 0)
            {
                strSpgates = strSpgates.Substring(0, iIndex);
            }
            //变更数据库
            SmsServer.BLL.SmsManager bll = new SmsServer.BLL.SmsManager();
            if (bll.SetSpgates(strUserID, strSpgates))
            {
                Response.Write("{success:true}");
            }
            else //失败
            {
                Response.Write("{success:false,errorInfo:'后台错误'}");
            }
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //权限检测
            string strout = string.Empty;

            if (SmsServer.BLL.SmsManager.HasPower(GetType().Name, Session["admin"], out strout) != 0)
            {
                Response.Write("{success:false,errorInfo:'" + strout + "'}");
                return;
            }

            try
            {
                if (object.Equals(null, Request.Form["jdata"]))  //没有类型控制参数
                {
                    Response.Write("{success:false,errorInfo:'非法操作'}");
                    return;
                }
                string strJson = Request.Form["jdata"].ToString();
                strJson = strJson.Replace("ReNewManagerPwd", "ExtraInfo");
                string strErrorInfo          = string.Empty;
                SmsServer.BLL.SmsManager bll = new SmsServer.BLL.SmsManager();
                if (bll.ModifyPwd(strJson, Session["admin"].ToString(), out strErrorInfo))
                {
                    Response.Write("{success:true}");
                }
                else
                {
                    Response.Write("{success:false,errorInfo:'" + strErrorInfo + "'}");
                }
            }
            catch (System.Exception ee)
            {
                Response.Write("{success:false,errorInfo:'服务器异常'}");
                return;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //Ȩ�޼��
            string strout = string.Empty;
            if (SmsServer.BLL.SmsManager.HasPower(GetType().Name, Session["admin"], out strout) != 0)
            {
                Response.Write("{success:false,errorInfo:'" + strout + "'}");
                return;
            }

            try
            {
                if (object.Equals(null, Request.Form["jdata"]))  //û�����Ϳ��Ʋ���
                {
                    Response.Write("{success:false,errorInfo:'�Ƿ�����'}");
                    return;
                }
                string strJson = Request.Form["jdata"].ToString();
                strJson = strJson.Replace("ReNewManagerPwd", "ExtraInfo");
                string strErrorInfo = string.Empty;
                SmsServer.BLL.SmsManager bll = new SmsServer.BLL.SmsManager();
                if (bll.ModifyPwd(strJson, Session["admin"].ToString(), out strErrorInfo))
                {
                    Response.Write("{success:true}");
                }
                else
                {
                    Response.Write("{success:false,errorInfo:'" + strErrorInfo + "'}");
                }
            }
            catch (System.Exception ee)
            {
                Response.Write("{success:false,errorInfo:'�������쳣'}");
                return;
            }
        }