コード例 #1
0
        protected void btnAddMyVersion_Click(object sender, EventArgs e)
        {
            if (myversionid == 0 || platformid == 0)
            {
                lblLog.Text = "参数错误";
                return;
            }
            string version = CtrlHelper.GetText(txtMyVersion);

            if (string.IsNullOrEmpty(version))
            {
                lblLog.Text = "请填写新版本";
                return;
            }
            string SDKPackageDir = ConfigurationManager.AppSettings["SDKPackageDir"];

            SDKPackageDir += "SDK\\Type_SDK\\" + version;
            if (!System.IO.Directory.Exists(SDKPackageDir))
            {
                Response.Write("<script>alert('SDK版本文件夹尚未创建!')</script>");
                return;
            }
            Message umsg = aideNativeWebFacade.AddMyVersion(version, Context.User.Identity.Name, platformid, myversionid);

            if (umsg.Success)
            {
                Response.Write("<script>window.opener.document.getElementById(\"hfreturnVal\").value = \"success\"</script>");
            }
            lblLog.Text = umsg.Content;
        }
コード例 #2
0
        protected void ButtonAddPlatformVersion_Click(object sender, EventArgs e)
        {
            this.LabelMessage.Text = "";
            string platformid      = this.DropDownListPlatform.SelectedValue;
            string sqlQuery        = string.Format(@"select platformName from sdk_DefaultPlatform where id={0}", platformid);
            string platformName    = aideNativeWebFacade.GetScalarBySql(sqlQuery);
            string platformVersion = CtrlHelper.GetText(TextBoxVersion);

            string systemId = CtrlHelper.GetSelectValue(DropDownListSystem);

            string SDKPackageDir        = "";
            string SDKAndroidPackageDir = ConfigurationManager.AppSettings["SDKPackageDir"];
            string SDKIOSPackageDir     = ConfigurationManager.AppSettings["SDKIOSPackageDir"];

            if (string.Equals(systemId, "1"))
            {
                SDKPackageDir = SDKAndroidPackageDir + "SDK\\Channel_SDK\\" + platformName + "\\" + platformVersion + "\\";
            }
            else
            {
                SDKPackageDir = SDKIOSPackageDir + "SDKFile\\ChannelSDKFramework\\sdk_include_" + platformName + "\\" + platformVersion + "\\";
            }

            if (!System.IO.Directory.Exists(SDKPackageDir))
            {
                Response.Write("<script>alert('渠道版本创建失败\\r\\n该渠道版本文件夹不存在!')</script>");
                //this.LabelMessage.Text = "渠道配置文件夹尚未创建!";
                return;
            }
            string  systemid = this.DropDownListSystem.SelectedValue;
            string  username = Context.User.Identity.Name;
            Message umsg     = aideNativeWebFacade.AddMyVersion(platformVersion, username, platformid, systemid);

            if (umsg.Success)
            {
                this.ListView1.DataBind();
                return;
            }
            Response.Write("<script>alert('" + umsg.Content + "')</script>");
            //this.LabelMessage.Text = umsg.Content;
        }