예제 #1
0
    public string applyCooperation(string ycCompID)
    {
        Information.ResultMsg msg = new Information.ResultMsg();

        if (HttpContext.Current.Session["UserModel"] is LoginModel)
        {
            LoginModel uModel = HttpContext.Current.Session["UserModel"] as LoginModel;

            if (uModel.CompID == ycCompID.ToInt(0))
            {
                msg.Msg = "无法申请成为自己的代理商";
            }
            else
            {
                msg.Result = true;
            }

            //if (uModel.Ctype == 2 || uModel.Ctype == 0)
            //{
            //    msg.Result = true;
            //}
            //else
            //{
            //    msg.Msg = "当前用户不是代理商,无法申请合作";
            //}
        }
        else
        {
            msg.Code = "Login";
        }
        return(new JavaScriptSerializer().Serialize(msg));
    }
예제 #2
0
    public string applyCooperation(string ycCompID)
    {
        Information.ResultMsg msg = new Information.ResultMsg();

        if (HttpContext.Current.Session["UserModel"] is LoginModel)
        {
            // 判断是否厂商自己申请自己
            LoginModel uModel = null;
            if (HttpContext.Current.Session["UserModel"] is LoginModel)
            {
                uModel = HttpContext.Current.Session["UserModel"] as LoginModel;
                if (LoginModel.GetUserCompID(uModel.UserID.ToString()) == ycCompID.ToInt(0))
                {
                    msg.Msg = "当前用户不是代理商,无法申请合作";
                }
                else
                {
                    msg.Result = true;
                }
            }
            else
            {
                msg.Result = true;
            }
        }
        else
        {
            msg.Code = "Login";
        }
        return(new JavaScriptSerializer().Serialize(msg));
    }