Пример #1
0
    protected void btnSoftSaveAs_Click(object sender, EventArgs e)
    {
        bool flag = CheckValidate();
        if (flag)
        {
            #region //添加软件
            DownLoadmodel.Id = Id;
            if(Id>0)
            {
                  DownLoadmodel = DownLoadBll.GetDownLoadData(Id);
            }
            if (!string.IsNullOrEmpty(Request.Form["ddlColId"]))
                DownLoadmodel.ColId = int.Parse(Request.Form["ddlColId"]);
            DownLoadmodel.Title = txtSoftName.Text.Trim();
            DownLoadmodel.UserCateId = int.Parse(ddlUserCate.SelectedValue);
            DownLoadmodel.TitleFontType = 0;
            DownLoadmodel.TitleType = 1;

            DownLoadmodel.Edition = txtSoftEdition.Text.Trim();
            DownLoadmodel.PlayAddress = txtSoftPlayAddress.Text.Trim();
            DownLoadmodel.UId = UserModel.UserID;
            DownLoadmodel.UName = UserModel.LogName;
            DownLoadmodel.UserType = 0;

            #region 关键字

            string tagIdStr = string.Empty;
            string nameStr = txtTagName.Text.Trim();
            if (nameStr.Length != 0)
            {
                if (nameStr.StartsWith("|"))
                    nameStr = nameStr.Substring(1, nameStr.Length - 1);
                if (nameStr.EndsWith("|"))
                    nameStr = nameStr.Substring(0, nameStr.Length - 1);
                B_Tag tagBll = new B_Tag();
                DataRow dr = tagBll.AddTagStr(nameStr, ChannelModel.ModelType, 0, "后台管理员");
                if (dr != null)
                {
                    tagIdStr = "|" + dr[0] + "|";
                    nameStr = "|" + dr[1] + "|";
                }
                else
                {
                    tagIdStr = "";
                    nameStr = "";
                }
            }
            DownLoadmodel.TagIdStr = tagIdStr;
            DownLoadmodel.TagNameStr = nameStr;
            #endregion

            DownLoadmodel.AddTime = DateTime.Now;
            DownLoadmodel.UpdateTime = DateTime.Now;
            if (txtSoftOS.Text.Trim().Length == 0)
                DownLoadmodel.DownLoadOS = "";
            else
                DownLoadmodel.DownLoadOS = "|" + txtSoftOS.Text.Trim() + "|";
            DownLoadmodel.Language = ddlSoftLanguage.SelectedValue;
            DownLoadmodel.WarrantType = ddlSoftWarrantType.SelectedValue;
            DownLoadmodel.RegAddress = txtSoftRegAddress.Text.Trim();

            if (ChannelModel.VerifyType == 0)
                DownLoadmodel.Status = 3;
            else
                DownLoadmodel.Status = 0;
            DownLoadmodel.Content = txtSoftRemark.Text.Trim();
            DownLoadmodel.PointCount = int.Parse(txtSoftPoint.Text.Trim());
            DownLoadmodel.IsDeleted = false;
            DownLoadmodel.DownLoadDisplePwd = txtSoftDisplePwd.Text.Trim();
            DownLoadmodel.DownLoadType = ddlSoftType.SelectedValue;
            DownLoadmodel.DownLoadSize = txtSoftSize.Text.Trim();
            if (Id <= 0)
                DownLoadmodel.IsOpened = 2;
            #region 继承栏目相关设置
            if (Id <= 0)
            {
                if (!string.IsNullOrEmpty(Request.Form["ddlColId"]) && Request.Form["ddlColId"] != "-1")
                {
                    ColumnModel = ColumnBll.GetColumn(int.Parse(Request.Form["ddlColId"].ToString()));
                    DownLoadmodel.TemplatePath = ColumnModel.InfoTemplatePath;
                    DownLoadmodel.PageType = ColumnModel.InfoPageType;
                    DownLoadmodel.ChargeType = ColumnModel.ChargeType;
                    DownLoadmodel.ChargeHourCount = ColumnModel.ChargeHourCount;
                    DownLoadmodel.ChargeViewCount = ColumnModel.ChargeViewCount;
                }
            }
            #endregion
            #endregion
            if (Id > 0)
                Id = DownLoadBll.Update(DownLoadmodel);
            else
                Id = DownLoadBll.Add(DownLoadmodel);
            AddressModel.AddressId = Convert.ToInt32(hfAddressId.Value);
            AddressModel.AddressName = "下载地址1";
            AddressModel.AddressNum = 1;
            AddressModel.AddressPath = txtSoftAddressPath.Text.Trim();
            AddressModel.DownLoadDataId = Id;
            AddressModel.DownLoadServerID = -1;
            if (AddressModel.AddressId > 0)
            { AddressBll.Update(AddressModel); }
            else
            {
                AddressBll.Add(AddressModel);
                #region 增加积分
                //如果频道不需要审核,添加积分
                if (ChannelModel.VerifyType == 0)
                {
                    if (UserModel == null)
                        return;
                    if (UserGroupBll == null)
                        return;
                    string scale = UserGroupBll.Power_UserGroup("Contribute", 0, UserGroupModel.GroupPower);
                    int score = int.Parse(scale) * ColumnModel.ScoreReward;
                    B_Money moneyBll = new B_Money();
                    moneyBll.Integral(score, UserModel.UserID);
                }
                #endregion
            }
            Response.Redirect("InfoList.aspx?ChId=" + ChId + "&ColId=" + DownLoadmodel.ColId);

        }
    }
Пример #2
0
 public M_DownLoad GetDownLoadData(int ID)
 {
     SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@tablename", "KyDownLoadData"), new SqlParameter("@Id", ID) };
     M_DownLoad load = new M_DownLoad();
     DataTable table = SqlHelper.ExecuteTable(SqlHelper.ConnectionStringKy, CommandType.StoredProcedure, "Up_Info_GetInfo", commandParameters);
     if (table.Rows.Count > 0)
     {
         load.Id = int.Parse(table.Rows[0]["Id"].ToString());
         load.ColId = int.Parse(table.Rows[0]["ColId"].ToString());
         load.Title = table.Rows[0]["Title"].ToString();
         load.TitleColor = table.Rows[0]["TitleColor"].ToString();
         load.TitleFontType = int.Parse(table.Rows[0]["TitleFontType"].ToString());
         load.TitleType = int.Parse(table.Rows[0]["TitleType"].ToString());
         load.TitleImgPath = table.Rows[0]["TitleImgPath"].ToString();
         load.UId = int.Parse(table.Rows[0]["UId"].ToString());
         load.UName = table.Rows[0]["UName"].ToString();
         load.UserType = int.Parse(table.Rows[0]["UserType"].ToString());
         load.AdminUId = int.Parse(table.Rows[0]["AdminUId"].ToString());
         load.AdminUName = table.Rows[0]["AdminUName"].ToString();
         load.Status = int.Parse(table.Rows[0]["Status"].ToString());
         load.HitCount = int.Parse(table.Rows[0]["HitCount"].ToString());
         load.AddTime = DateTime.Parse(table.Rows[0]["AddTime"].ToString());
         load.UpdateTime = DateTime.Parse(table.Rows[0]["UpdateTime"].ToString());
         load.TemplatePath = table.Rows[0]["TemplatePath"].ToString();
         load.PageType = int.Parse(table.Rows[0]["PageType"].ToString());
         if (table.Rows[0]["IsCreated"].ToString().ToLower() == "true")
         {
             load.IsCreated = true;
         }
         else
         {
             load.IsCreated = false;
         }
         load.UserCateId = int.Parse(table.Rows[0]["UserCateId"].ToString());
         load.PointCount = int.Parse(table.Rows[0]["PointCount"].ToString());
         load.ChargeType = int.Parse(table.Rows[0]["ChargeType"].ToString());
         load.ChargeHourCount = int.Parse(table.Rows[0]["ChargeHourCount"].ToString());
         load.ChargeViewCount = int.Parse(table.Rows[0]["ChargeViewCount"].ToString());
         load.IsOpened = int.Parse(table.Rows[0]["IsOpened"].ToString());
         load.GroupIdStr = table.Rows[0]["GroupIdStr"].ToString();
         if (table.Rows[0]["IsDeleted"].ToString().ToLower() == "true")
         {
             load.IsDeleted = true;
         }
         else
         {
             load.IsDeleted = false;
         }
         if (table.Rows[0]["IsRecommend"].ToString().ToLower() == "true")
         {
             load.IsRecommend = true;
         }
         else
         {
             load.IsRecommend = false;
         }
         if (table.Rows[0]["IsTop"].ToString().ToLower() == "true")
         {
             load.IsTop = true;
         }
         else
         {
             load.IsTop = false;
         }
         if (table.Rows[0]["IsFocus"].ToString().ToLower() == "true")
         {
             load.IsFocus = true;
         }
         else
         {
             load.IsFocus = false;
         }
         if (table.Rows[0]["IsSideShow"].ToString().ToLower() == "true")
         {
             load.IsSideShow = true;
         }
         else
         {
             load.IsSideShow = false;
         }
         if (table.Rows[0]["IsAllowComment"].ToString().ToLower() == "true")
         {
             load.IsAllowComment = true;
         }
         else
         {
             load.IsAllowComment = false;
         }
         load.TagIdStr = table.Rows[0]["TagIdStr"].ToString();
         load.TagNameStr = table.Rows[0]["TagNameStr"].ToString();
         load.SpecialIdStr = table.Rows[0]["SpecialIdStr"].ToString();
         load.Content = table.Rows[0]["Content"].ToString();
         load.Edition = table.Rows[0]["Edition"].ToString();
         load.PlayAddress = table.Rows[0]["PlayAddress"].ToString();
         load.DownLoadDownNum = int.Parse(table.Rows[0]["DownLoadDownNum"].ToString());
         load.DownLoadDownMonthNum = int.Parse(table.Rows[0]["DownLoadDownMonthNum"].ToString());
         load.DownLoadDownWeekNum = int.Parse(table.Rows[0]["DownLoadDownWeekNum"].ToString());
         load.DownLoadDownDayNum = int.Parse(table.Rows[0]["DownLoadDownDayNum"].ToString());
         load.DownLoadOS = table.Rows[0]["DownLoadOS"].ToString();
         load.DownLoadServerDataId = int.Parse(table.Rows[0]["DownLoadServerDataId"].ToString());
         load.WarrantType = table.Rows[0]["WarrantType"].ToString();
         load.Language = table.Rows[0]["Language"].ToString();
         load.DownLoadSize = table.Rows[0]["DownLoadSize"].ToString();
         load.RegAddress = table.Rows[0]["RegAddress"].ToString();
         load.Plugin = table.Rows[0]["Plugin"].ToString();
         load.DownLoadStarLevel = table.Rows[0]["DownLoadStarLevel"].ToString();
         load.DownLoadDisplePwd = table.Rows[0]["DownLoadDisplePwd"].ToString();
         load.DownLoadType = table.Rows[0]["DownLoadType"].ToString();
         return load;
     }
     return null;
 }
Пример #3
0
 protected void ShowInfo(int Id)
 {
     DataTable dt = AddressBll.GetInfoBySoftId(Id);
     txtSoftAddressPath.Text = dt.Rows[0]["AddressPath"].ToString();
     hfAddressId.Value = dt.Rows[0]["Addressid"].ToString();
     DownLoadmodel = DownLoadBll.GetDownLoadData(Id);
     if (DownLoadmodel == null)
     {
         Function.ShowMsg(0, "<li>所选" + ChannelModel.TypeName + "不存在或已经被删除</li><li><a href='javascript:history.back()'>返回上一级</a></li>");
     }
     txtSoftName.Text = DownLoadmodel.Title;
     ddlUserCate.SelectedValue = DownLoadmodel.UserCateId.ToString();
     txtSoftEdition.Text = DownLoadmodel.Edition;
     ddlSoftType.SelectedValue = DownLoadmodel.DownLoadType;
     ddlSoftLanguage.SelectedValue = DownLoadmodel.Language;
     ddlSoftWarrantType.SelectedValue = DownLoadmodel.WarrantType;
     string tagNameStr = DownLoadmodel.TagNameStr;
     if (tagNameStr != string.Empty && tagNameStr.StartsWith("|") && tagNameStr.EndsWith("|"))
     {
         tagNameStr = tagNameStr.Substring(0, tagNameStr.Length - 1);
         tagNameStr = tagNameStr.Substring(1, tagNameStr.Length - 1);
     }
     txtTagName.Text = tagNameStr;
     if (DownLoadmodel.DownLoadOS == "")
         txtSoftOS.Text = "";
     else
     {
         string softOs = DownLoadmodel.DownLoadOS.Substring(0, DownLoadmodel.DownLoadOS.Length - 1);
         softOs = softOs.Substring(1, softOs.Length - 1);
         txtSoftOS.Text = softOs;
     }
     txtSoftSize.Text = DownLoadmodel.DownLoadSize.ToString();
     txtSoftRegAddress.Text = DownLoadmodel.RegAddress;
     txtSoftPlayAddress.Text = DownLoadmodel.PlayAddress;
     txtSoftRemark.Text = DownLoadmodel.Content;
     txtSoftPoint.Text = DownLoadmodel.PointCount.ToString();
     hfIsOpened.Value = DownLoadmodel.IsOpened.ToString();
     txtSoftDisplePwd.Text = DownLoadmodel.DownLoadDisplePwd;
 }
Пример #4
0
 public int Update(M_DownLoad model)
 {
     return this.Add(model);
 }
Пример #5
0
 public int Add(M_DownLoad model)
 {
     SqlParameter[] commandParameters = new SqlParameter[] {
         new SqlParameter("@Id", SqlDbType.Int, 4), new SqlParameter("@ColId", SqlDbType.Int, 4), new SqlParameter("@Title", SqlDbType.NVarChar), new SqlParameter("@TitleColor", SqlDbType.NVarChar), new SqlParameter("@TitleFontType", SqlDbType.Int, 4), new SqlParameter("@TitleType", SqlDbType.Int, 4), new SqlParameter("@TitleImgPath", SqlDbType.VarChar, 255), new SqlParameter("@UId", SqlDbType.Int, 4), new SqlParameter("@UName", SqlDbType.NVarChar), new SqlParameter("@UserType", SqlDbType.Int, 4), new SqlParameter("@AdminUId", SqlDbType.Int, 4), new SqlParameter("@AdminUName", SqlDbType.NVarChar), new SqlParameter("@Status", SqlDbType.Int, 4), new SqlParameter("@HitCount", SqlDbType.Int, 4), new SqlParameter("@AddTime", SqlDbType.DateTime), new SqlParameter("@UpdateTime", SqlDbType.DateTime),
         new SqlParameter("@TemplatePath", SqlDbType.VarChar, 255), new SqlParameter("@PageType", SqlDbType.Int, 4), new SqlParameter("@IsCreated", SqlDbType.Bit, 1), new SqlParameter("@UserCateId", SqlDbType.Int, 4), new SqlParameter("@PointCount", SqlDbType.Int, 4), new SqlParameter("@ChargeType", SqlDbType.Int, 4), new SqlParameter("@ChargeHourCount", SqlDbType.Int, 4), new SqlParameter("@ChargeViewCount", SqlDbType.Int, 4), new SqlParameter("@IsOpened", SqlDbType.Int, 4), new SqlParameter("@GroupIdStr", SqlDbType.VarChar, 200), new SqlParameter("@IsDeleted", SqlDbType.Bit, 1), new SqlParameter("@IsRecommend", SqlDbType.Bit, 1), new SqlParameter("@IsTop", SqlDbType.Bit, 1), new SqlParameter("@IsFocus", SqlDbType.Bit, 1), new SqlParameter("@IsSideShow", SqlDbType.Bit, 1), new SqlParameter("@TagIdStr", SqlDbType.VarChar, 300),
         new SqlParameter("@TagNameStr", SqlDbType.NVarChar), new SqlParameter("@SpecialIdStr", SqlDbType.VarChar, 200), new SqlParameter("@Content", SqlDbType.NVarChar, 500), new SqlParameter("@Edition", SqlDbType.NVarChar), new SqlParameter("@PlayAddress", SqlDbType.NVarChar), new SqlParameter("@DownLoadDownNum", SqlDbType.Int, 4), new SqlParameter("@DownLoadDownMonthNum", SqlDbType.Int, 4), new SqlParameter("@DownLoadDownWeekNum", SqlDbType.Int, 4), new SqlParameter("@DownLoadDownDayNum", SqlDbType.Int, 4), new SqlParameter("@DownLoadOS", SqlDbType.NVarChar), new SqlParameter("@DownLoadServerDataId", SqlDbType.NVarChar), new SqlParameter("@Language", SqlDbType.NVarChar), new SqlParameter("@WarrantType", SqlDbType.NVarChar), new SqlParameter("@DownLoadSize", SqlDbType.NVarChar), new SqlParameter("@RegAddress", SqlDbType.NVarChar), new SqlParameter("@Plugin", SqlDbType.NVarChar),
         new SqlParameter("@DownLoadStarLevel", SqlDbType.NVarChar), new SqlParameter("@DownLoadDisplePwd", SqlDbType.NVarChar), new SqlParameter("@DownLoadType", SqlDbType.NVarChar), new SqlParameter("@IsAllowComment", SqlDbType.Bit, 1)
      };
     commandParameters[0].Value = model.Id;
     commandParameters[1].Value = model.ColId;
     commandParameters[2].Value = model.Title;
     commandParameters[3].Value = model.TitleColor;
     commandParameters[4].Value = model.TitleFontType;
     commandParameters[5].Value = model.TitleType;
     commandParameters[6].Value = model.TitleImgPath;
     commandParameters[7].Value = model.UId;
     commandParameters[8].Value = model.UName;
     commandParameters[9].Value = model.UserType;
     commandParameters[10].Value = model.AdminUId;
     commandParameters[11].Value = model.AdminUName;
     commandParameters[12].Value = model.Status;
     commandParameters[13].Value = model.HitCount;
     commandParameters[14].Value = model.AddTime;
     commandParameters[15].Value = model.UpdateTime;
     commandParameters[16].Value = model.TemplatePath;
     commandParameters[17].Value = model.PageType;
     commandParameters[18].Value = model.IsCreated;
     commandParameters[19].Value = model.UserCateId;
     commandParameters[20].Value = model.PointCount;
     commandParameters[21].Value = model.ChargeType;
     commandParameters[22].Value = model.ChargeHourCount;
     commandParameters[23].Value = model.ChargeViewCount;
     commandParameters[24].Value = model.IsOpened;
     commandParameters[25].Value = model.GroupIdStr;
     commandParameters[26].Value = model.IsDeleted;
     commandParameters[27].Value = model.IsRecommend;
     commandParameters[28].Value = model.IsTop;
     commandParameters[29].Value = model.IsFocus;
     commandParameters[30].Value = model.IsSideShow;
     commandParameters[31].Value = model.TagIdStr;
     commandParameters[32].Value = model.TagNameStr;
     commandParameters[33].Value = model.SpecialIdStr;
     commandParameters[34].Value = model.Content;
     commandParameters[35].Value = model.Edition;
     commandParameters[36].Value = model.PlayAddress;
     commandParameters[37].Value = model.DownLoadDownNum;
     commandParameters[38].Value = model.DownLoadDownMonthNum;
     commandParameters[39].Value = model.DownLoadDownWeekNum;
     commandParameters[40].Value = model.DownLoadDownDayNum;
     commandParameters[41].Value = model.DownLoadOS;
     commandParameters[42].Value = model.DownLoadServerDataId;
     commandParameters[43].Value = model.Language;
     commandParameters[44].Value = model.WarrantType;
     commandParameters[45].Value = model.DownLoadSize;
     commandParameters[46].Value = model.RegAddress;
     commandParameters[47].Value = model.Plugin;
     commandParameters[48].Value = model.DownLoadStarLevel;
     commandParameters[49].Value = model.DownLoadDisplePwd;
     commandParameters[50].Value = model.DownLoadType;
     commandParameters[51].Value = model.IsAllowComment;
     commandParameters[0].Direction = ParameterDirection.InputOutput;
     SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringKy, CommandType.StoredProcedure, "Up_DownLoadData_Set", commandParameters);
     return int.Parse(commandParameters[0].Value.ToString());
 }
Пример #6
0
    protected void ShowDownLoadInfo(int id)
    {
        DownLoadmodel = DownLoadBll.GetDownLoadData(id);
        if (DownLoadmodel.TitleType == 1)
            rbComm.Checked = true;
        else if (DownLoadmodel.TitleType == 2)
            rbImg.Checked = true;
        txtTitleImgPath.Text = DownLoadmodel.TitleImgPath;
        dt = AddressBll.GetInfoBySoftId(id);
        txtreturnNum.Text = dt.Rows.Count.ToString();
        returnNum = dt.Rows.Count;
        for (int i = 0; i < dt.Rows.Count;i++ )
        {
            AddressId += dt.Rows[i]["AddressId"].ToString()+",";
            AddressName += "'"+dt.Rows[i]["AddressName"].ToString() + "',";
            DownServerId += "'" + dt.Rows[i]["DownLoadServerID"].ToString() + "',";
            AddressPath += "'" + dt.Rows[i]["AddressPath"] + "',";
        }
        if (dt.Rows.Count != 0)
        {
            AddressId = AddressId.Substring(0, AddressId.Length - 1);
            AddressName = AddressName.Substring(0, AddressName.Length - 1);
            DownServerId = DownServerId.Substring(0, DownServerId.Length - 1);
            AddressPath = AddressPath.Substring(0, AddressPath.Length - 1);
        }
        txtAddressIdstr.Text = AddressId;
        if(DownLoadmodel==null || DownLoadmodel.Status==-1)
        {
            litMsg.Text = "<script type='text/javascript'>alert('所选" + ChannelModel.TypeName + "不存在或已经被删除');history.back();</script>";
            Response.End();
            return;
        }
        txtSoftName.Text = DownLoadmodel.Title;
        txtSoftEdition.Text = DownLoadmodel.Edition;
        txtSoftPlayAddress.Text = DownLoadmodel.PlayAddress;
        //所属专题
        string[] arraySpecialIdStr = DownLoadmodel.SpecialIdStr.Split('|');
        for (int i = 0; i < arraySpecialIdStr.Length;i++ )
        {
            for (int j = 0; j< lBoxSpecialIdStr.Items.Count;j++ )
            {
                if (lBoxSpecialIdStr.Items[j].Value == arraySpecialIdStr[i])
                    lBoxSpecialIdStr.Items[j].Selected = true;
            }
        }
        string tagNameStr = DownLoadmodel.TagNameStr;
        if (tagNameStr != string.Empty && tagNameStr.StartsWith("|") && tagNameStr.EndsWith("|"))
        {
            tagNameStr = tagNameStr.Substring(0, tagNameStr.Length - 1);
            tagNameStr = tagNameStr.Substring(1, tagNameStr.Length - 1);
        }
        tagNameStr = tagNameStr.Replace("|", " ");
        txtTagName.Text = tagNameStr;

        txtSoftDownNum.Text = DownLoadmodel.DownLoadDownNum.ToString();
        txtSoftDownDayNum.Text = DownLoadmodel.DownLoadDownDayNum.ToString();
        txtSoftDownWeekNum.Text = DownLoadmodel.DownLoadDownWeekNum.ToString();
        txtSoftDownMonthNum.Text = DownLoadmodel.DownLoadDownMonthNum.ToString();

        //添加时间
        txtAddTime.Text = DownLoadmodel.AddTime.ToString();

        if (DownLoadmodel.DownLoadOS == "")
            txtSoftOS.Text = "";
        else
        {
            string softOs = DownLoadmodel.DownLoadOS.Substring(0, DownLoadmodel.DownLoadOS.Length - 1);
            softOs=softOs.Substring(1, softOs.Length - 1);
            txtSoftOS.Text = softOs;
        }
        txtTitleColor.Text = DownLoadmodel.TitleColor;
        ddlTitleFontType.SelectedValue = DownLoadmodel.TitleFontType.ToString();
        try
        {
            ddlSoftType.SelectedValue = DownLoadmodel.DownLoadType;
            ddlSoftLanguage.SelectedValue = DownLoadmodel.Language;
            ddlSoftWarrantType.SelectedValue = DownLoadmodel.WarrantType;
            ddlSoftGrade.SelectedValue = DownLoadmodel.DownLoadStarLevel.ToString();
        }
        catch { }

        txtSoftSize.Text = DownLoadmodel.DownLoadSize.ToString();
        txtSoftRegAddress.Text = DownLoadmodel.RegAddress;
        chkBoxIsTop.Checked = DownLoadmodel.IsTop;
        chkBoxIsRecommand.Checked = DownLoadmodel.IsRecommend;
        chkBoxIsFocus.Checked = DownLoadmodel.IsFocus;
        chkBoxIsSideShow.Checked = DownLoadmodel.IsSideShow;
        chkBoxIsAllowComment.Checked = DownLoadmodel.IsAllowComment;
        txtSoftRemark.Value = DownLoadmodel.Content;
        //保存路径
        ddlSoftPlugin.SelectedValue= DownLoadmodel.Plugin;
           // txtSoftAddress.Text = DownLoadmodel.SoftAddress;
        txtSoftPoint.Text = DownLoadmodel.PointCount.ToString();
        txtSoftDisplePwd.Text = DownLoadmodel.DownLoadDisplePwd;
        txtSoftTemplatePath.Text = DownLoadmodel.TemplatePath;
        rdBtnPageType.SelectedValue = DownLoadmodel.PageType.ToString();
        rdBtnIsOpened.SelectedValue = DownLoadmodel.IsOpened.ToString();
        hfHitCount.Value =DownLoadmodel.HitCount .ToString();

        foreach(ListItem li in chkBoxGroupIdStr.Items)
        {
            if(DownLoadmodel.GroupIdStr.IndexOf("|"+li.Value+"|")!=-1)
                li.Selected=true;
        }
        //收费方式
        switch (DownLoadmodel.ChargeType)
        {
            case 1:
                rdBtnChargeType1.Checked = true;
                break;
            case 2:
                txtChargeHourCount.Text = DownLoadmodel.ChargeHourCount.ToString();
                rdBtnChargeType2.Checked = true;
                break;
            case 3:
                rdBtnChargeType3.Checked = true;
                txtChargeViewCount.Text = DownLoadmodel.ChargeViewCount.ToString();
                break;
            case 4:
                rdBtnChargeType4.Checked = true;
                txtChargeHourCount.Text = DownLoadmodel.ChargeHourCount.ToString();
                txtChargeViewCount.Text = DownLoadmodel.ChargeViewCount.ToString();
                break;
            case 5:
                rdBtnChargeType5.Checked = true;
                txtChargeHourCount.Text = DownLoadmodel.ChargeHourCount.ToString();
                txtChargeViewCount.Text = DownLoadmodel.ChargeViewCount.ToString();
                break;
        }
        btnSoftSaveAs.Text = "确定修改";
    }
Пример #7
0
 public int Update(M_DownLoad model)
 {
     return this.IDL.Update(model);
 }
Пример #8
0
 public int Add(M_DownLoad model)
 {
     return this.IDL.Add(model);
 }