コード例 #1
0
 //保存类别
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (action == DTEnums.ActionEnum.Edit.ToString()) //修改
     {
         if (!DoEdit(this.id))
         {
             JscriptMsg("保存过程中发生错误啦!", "", "Error");
             return;
         }
         //JscriptMsg("修改类别成功啦!", "list.aspx?channel_id=" + channel_id, "Success");
         //Response.Redirect("list.aspx?channel_id=" + this.channel_id);
         ShowMsgHelper.ShowAndRedirect(this, "修改类别成功啦!", "list.aspx?channel_id=" + this.channel_id);
     }
     else //添加
     {
         if (!DoAdd())
         {
             JscriptMsg("保存过程中发生错误啦!", "", "Error");
             return;
         }
         //JscriptMsg("添加类别成功啦!", "list.aspx?channel_id=" + channel_id, "Success");
         //Response.Redirect("list.aspx?channel_id=" + this.channel_id);
         ShowMsgHelper.ShowAndRedirect(this, "添加类别成功啦!", "list.aspx?channel_id=" + this.channel_id);
     }
 }
コード例 #2
0
ファイル: edit.aspx.cs プロジェクト: ioriwellings/PM
 //保存
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (action == DTEnums.ActionEnum.Edit.ToString()) //修改
     {
         //ChkAdminLevel(channel_id, DTEnums.ActionEnum.Edit.ToString()); //检查权限
         if (!DoEdit(this.id))
         {
             JscriptMsg("保存过程中发生错误啦!", "", "Error");
             return;
         }
         //ShowMsgHelper.ShowAndRedirect(this,"修改文章成功啦!", ResolveUrl("list.aspx?channel_id=" + this.channel_id));
         //JscriptMsg("修改文章成功啦!", "list.aspx?channel_id=" + this.channel_id, "Success");
         //ShowMsgHelper.ShowAndRedirect(this, "操作成功!", ResolveUrl("~/FundManages/FundInfo_List.aspx"));
         //JscriptMsg("修改文章成功啦!", "", "Success");
         //Response.Write("<script>alert('修改文章成功啦!')</script>");
         //Response.Redirect("list.aspx?channel_id=" + this.channel_id);
         ShowMsgHelper.ShowAndRedirect(this, "修改文章成功啦!", "list.aspx?channel_id=" + this.channel_id);
     }
     else //添加
     {
         //ChkAdminLevel(channel_id, DTEnums.ActionEnum.Add.ToString()); //检查权限
         if (!DoAdd())
         {
             JscriptMsg("保存过程中发生错误啦!", "", "Error");
             return;
         }
         //ShowMsgHelper.ShowAndRedirect(this.Page, "修改文章成功啦!", "list.aspx?channel_id=" + this.channel_id);
         //JscriptMsg("添加文章成功啦!", "list.aspx?channel_id=" + this.channel_id, "Success");
         //JscriptMsg("修改文章成功啦!", "", "Success");
         //Response.Write("<script>alert('添加文章成功啦!')</script>");
         //Response.Redirect("list.aspx?channel_id=" + this.channel_id);
         ShowMsgHelper.ShowAndRedirect(this, "添加文章成功啦!", "list.aspx?channel_id=" + this.channel_id);
     }
 }
コード例 #3
0
ファイル: list.aspx.cs プロジェクト: ioriwellings/PM
        //批量删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            //ChkAdminLevel(channel_id, DTEnums.ActionEnum.Delete.ToString()); //检查权限
            BLL.article bll     = new BLL.article();
            Repeater    rptList = new Repeater();

            switch (this.prolistview)
            {
            case "Txt":
                rptList = this.rptList1;
                break;

            default:
                rptList = this.rptList2;
                break;
            }
            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    bll.Delete(id);
                }
            }
            //JscriptMsg("批量删除成功啦!", Utils.CombUrlTxt("list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
            //    this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property), "Success");
            //Response.Redirect(Utils.CombUrlTxt("list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
            //    this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property));
            ShowMsgHelper.ShowAndRedirect(this, "批量删除成功啦!", Utils.CombUrlTxt("list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
                                                                             this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property));
        }
コード例 #4
0
ファイル: list.aspx.cs プロジェクト: ioriwellings/PM
        //保存排序
        protected void btnSave_Click(object sender, EventArgs e)
        {
            BLL.article bll     = new BLL.article();
            Repeater    rptList = new Repeater();

            switch (this.prolistview)
            {
            case "Txt":
                rptList = this.rptList1;
                break;

            default:
                rptList = this.rptList2;
                break;
            }
            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                int sortId;
                if (!int.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId))
                {
                    sortId = 99;
                }
                bll.UpdateField(id, "sort_id=" + sortId.ToString());
            }
            //JscriptMsg("保存排序成功啦!", Utils.CombUrlTxt("list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
            //    this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property), "Success");
            //Response.Redirect(Utils.CombUrlTxt("list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
            //    this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property));
            ShowMsgHelper.ShowAndRedirect(this, "保存排序成功啦!", Utils.CombUrlTxt("list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
                                                                             this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property));
        }
コード例 #5
0
 //删除类别
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     //ChkAdminLevel(channel_id, DTEnums.ActionEnum.Delete.ToString()); //检查权限
     BLL.category bll = new BLL.category();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             bll.Delete(id);
         }
     }
     //JscriptMsg("批量删除成功啦!", Utils.CombUrlTxt("list.aspx", "channel_id={0}", this.channel_id.ToString()), "Success");
     //Response.Redirect(Utils.CombUrlTxt("list.aspx", "channel_id={0}", this.channel_id.ToString()));
     ShowMsgHelper.ShowAndRedirect(this, "批量删除成功啦!", Utils.CombUrlTxt("list.aspx", "channel_id={0}", this.channel_id.ToString()));
 }
コード例 #6
0
 //保存排序
 protected void btnSave_Click(object sender, EventArgs e)
 {
     BLL.category bll = new BLL.category();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         int sortId;
         if (!int.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId))
         {
             sortId = 99;
         }
         bll.UpdateField(id, "sort_id=" + sortId.ToString());
     }
     //JscriptMsg("保存排序成功啦!", Utils.CombUrlTxt("list.aspx", "channel_id={0}", this.channel_id.ToString()), "Success");
     //Response.Redirect(Utils.CombUrlTxt("list.aspx", "channel_id={0}", this.channel_id.ToString()));
     ShowMsgHelper.ShowAndRedirect(this, "保存排序成功啦!", Utils.CombUrlTxt("list.aspx", "channel_id={0}", this.channel_id.ToString()));
 }