protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         C_CopyRight.CheckLogin();
         CheckHasRule();
         if (GeneralID > 0)
         {
             M_CommonData conMod = conBll.SelReturnModel(GeneralID);
             NodeID       = conMod.NodeID;
             ModelID      = conMod.ModelID;
             Title_T.Text = conMod.Title;
             DataTable conDT = DBCenter.Sel(conMod.TableName, "ID=" + conMod.ItemID);
             if (conDT.Rows.Count > 0 && conDT.Columns.Contains("content"))
             {
                 content_t.Text = conDT.Rows[0]["content"].ToString();
             }
         }
         else
         {
             NodeID = 1; ModelID = 2;
         }
         M_Node      nodeMod = nodeBll.SelReturnModel(NodeID);
         M_ModelInfo model   = modelBll.SelReturnModel(ModelID);
         string      bread   = "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>" + Resources.L.工作台 + "</a></li><li><a href='ContentManage.aspx'>" + Resources.L.内容管理 + "</a></li><li><a href='ContentManage.aspx?NodeID=" + nodeMod.NodeID + "'>" + nodeMod.NodeName + "</a></li>";
         bread += "<li class='active'>[向本栏目添加" + model.ItemName + "]</li>";
         Call.SetBreadCrumb(Master, bread);
     }
 }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         C_CopyRight.CheckLogin();
         auth_ifr.Attributes.Add("src", "http://sale.banquanyin.com/authorization/");
         Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='" + CustomerPageAction.customPath2 + "Plus/ADManage.aspx'>扩展功能</a></li><li><a  href=\"Config.aspx\">版权中心</a></li><li class=\"active\">我的授权</li>");
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     //copyBll.Redirect_URI = Request.Url.ToString();
     if (!IsPostBack)
     {
         C_CopyRight.CheckLogin();
         workslist_ifr.Attributes.Add("src", "http://sale.banquanyin.com/works/get_list/all");
         Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='" + CustomerPageAction.customPath2 + "Plus/ADManage.aspx'>扩展功能</a></li><li><a  href=\"Config.aspx\">版权中心</a></li><li class=\"active\">作品列表[<a href=\"AddWorks.aspx\">添加作品</a>]</li>");
     }
 }
Пример #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         C_CopyRight.CheckLogin();
         Prompt_Div.Visible = (DeviceHelper.GetBrower() == DeviceHelper.Brower.IE);
         config_ifr.Attributes.Add("src", "http://open.banquanyin.com/login");
         Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='" + CustomerPageAction.customPath2 + "Plus/ADManage.aspx'>扩展功能</a></li><li><a  href=\"Register.aspx\">版权中心</a></li><li class=\"active\">版权配置 [<i class='fa  fa-check-circle-o'></i>配置信息验证成功,请登陆管理版权收入][<a href='" + CustomerPageAction.customPath2 + "/Config/PlatInfoList.aspx'>重新配置</a>]</li>");
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     //copyBll.Redirect_URI = Request.Url.ToString();
     if (!IsPostBack)
     {
         C_CopyRight.CheckLogin();
         MyBind(Skey);
         //Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='" + CustomerPageAction.customPath2 + "Plus/ADManage.aspx'>扩展功能</a></li><li><a  href=\"Config.aspx\">版权中心</a></li><li class=\"active\">作品列表[<a href=\"AddWorks.aspx\">添加作品</a>]</li>");
     }
 }
Пример #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            M_Third_Info crMod = new B_Third_Info().SelModelByName("CR");

            //未配置信息,则先引导其去配置
            if (crMod == null || string.IsNullOrEmpty(crMod.Key) || string.IsNullOrEmpty(crMod.Secret))
            {
                Response.Redirect(CustomerPageAction.customPath2 + "APP/Suppliers.aspx");
            }
            else if (string.IsNullOrEmpty(Code))
            {
                function.WriteErrMsg("未传入Code值,请先登录");
            }
            else
            {
                C_CopyRight crBll = new C_CopyRight();
                if (string.IsNullOrEmpty(C_CopyRight.AccessToken))
                {
                    function.WriteErrMsg("获取Token失败,Code[" + Code + "]");
                }
                Response.Redirect(Url);
            }
        }
        protected void EGV_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            C_CopyRight copyBll = new C_CopyRight();

            switch (e.CommandName)
            {
            case "del":
            {
                M_Content_CR crMod  = new M_Content_CR();
                string       result = copyBll.Remove(crMod.WorksID);
                JObject      obj    = JsonConvert.DeserializeObject <JObject>(result);
                if ("1".Equals(obj["value"]))
                {
                    crBll.Del(crMod.ID);
                }
                else
                {
                    function.WriteErrMsg("删除失败:" + result);
                }
            }
            break;
            }
            MyBind();
        }
Пример #8
0
        public void ProcessRequest(HttpContext context)
        {
            M_AdminInfo adminMod = B_Admin.GetLogin();

            retMod.retcode = M_APIResult.Failed;
            //retMod.callback = CallBack;//暂不开放JsonP
            M_Third_PlatInfo infoMod = B_Third_PlatInfo.SelByFlag("版权印");

            if (infoMod == null || string.IsNullOrEmpty(infoMod.APPKey) || string.IsNullOrEmpty(infoMod.APPSecret))
            {
                retMod.retmsg = "未配置版权印接口"; RepToClient(retMod);
            }
            crAPI = new C_CopyRight();
            try
            {
                int gid = DataConvert.CLng(Req("gid"));
                switch (Action)
                {
                case "add":
                {
                    M_CommonData conMod = conBll.SelReturnModel(gid);
                    if (conMod == null)
                    {
                        retMod.retmsg = "未指定内容!"; break;
                    }
                    else
                    {
                        JObject obj = Add(conMod);
                        if (DataConvert.CLng(obj["value"]) == 1)
                        {
                            retMod.result  = obj["data"].ToString();
                            retMod.retcode = M_APIResult.Success;
                        }
                        else
                        {
                            retMod.retmsg = obj["msg"].ToString();
                        }
                    }
                }
                break;

                case "del":
                {
                    M_Content_CR crMod = crBll.SelByGid(gid);
                    if (crMod == null)
                    {
                        retMod.retmsg = "该内容未生成版权印"; break;
                    }
                    string  delResult = crAPI.Remove(crMod.WorksID);
                    JObject delObj    = JsonConvert.DeserializeObject <JObject>(delResult);
                    if (DataConvert.CLng(delObj["value"]) != 1)
                    {
                        retMod.retmsg = "删除失败,返回" + delResult;
                    }
                    else
                    {
                        crBll.Del(crMod.ID);
                        retMod.retcode = M_APIResult.Success;
                    }
                }
                break;

                case "readd":
                {
                    //删除
                    M_Content_CR crMod = crBll.SelByGid(gid);
                    if (crMod == null)
                    {
                        retMod.retmsg = "该内容未生成版权印"; break;
                    }
                    string  delResult = crAPI.Remove(crMod.WorksID);
                    JObject delObj    = JsonConvert.DeserializeObject <JObject>(delResult);
                    if (DataConvert.CLng(delObj["value"]) != 1)
                    {
                        retMod.retmsg = "删除失败,返回" + delResult; break;
                    }
                    else
                    {
                        crBll.Del(crMod.ID);
                    }
                    //重新添加
                    M_CommonData conMod = conBll.SelReturnModel(gid);
                    JObject      addObj = Add(conMod);
                    if (DataConvert.CLng(addObj["value"]) == 1)
                    {
                        retMod.result  = addObj["data"].ToString();
                        retMod.retcode = M_APIResult.Success;
                    }
                    else
                    {
                        retMod.retmsg = addObj["msg"].ToString();
                    }
                }
                break;

                case "get":
                {
                    M_Content_CR crMod = crBll.SelByGid(gid);
                    if (crMod != null)
                    {
                        retMod.retcode = M_APIResult.Success; retMod.result = JsonConvert.SerializeObject(crMod);
                    }
                }
                break;

                default:
                    retMod.retmsg = "[" + Action + "]接口不存在";
                    break;
                }
            }
            catch (Exception ex) { retMod.retmsg = ex.Message; }
            RepToClient(retMod);
        }