Ejemplo n.º 1
0
    private bool DoEdit(int _id)
    {
        bool result = false;

        tbl_sinkia_help model = new tbl_sinkia_help();

        //if (model.Exists(txttitle.Text.Trim(), _id))
        //{
        //    mym.JscriptMsg(this.Page, "您输入的类别名称已经存在,请检查!", "", "Error");
        //    return false;
        //}
        model.GetModel(_id);

        model.help1     = txtImgUrl_mob.Text;
        model.sort_id   = int.Parse(txtSortId.Text.Trim());
        model.help1_url = pid.Text;

        if (model.Update())
        {
            // mym.AddAdminLog("修改", "修改商品类别:" + txttitle.Text); //记录日志
            result = true;
        }

        return(result);
    }
Ejemplo n.º 2
0
    private void ShowInfo(int _id)
    {
        tbl_sinkia_help model = new tbl_sinkia_help();

        model.GetModel(_id);

        txtSortId.Text     = model.sort_id.ToString();
        txtImgUrl_mob.Text = model.help1;
        pid.Text           = model.help1_url.ToString();
    }
Ejemplo n.º 3
0
    // 单个删除
    protected void lbtnDelCa_Click(object sender, EventArgs e)
    {
        // 当前点击的按钮
        LinkButton      lb   = (LinkButton)sender;
        int             caId = int.Parse(lb.CommandArgument);
        tbl_sinkia_help bll  = new tbl_sinkia_help();

        bll.GetModel(caId);
        bll.Delete(caId);

        mym.JscriptMsg(this.Page, " 成功删除商品类别:" + bll.help1 + "", Utils.CombUrlTxt("Help_list.aspx", "keywords={0}&page={1}", this.keywords, this.page.ToString()), "Success");
    }
Ejemplo n.º 4
0
    private void RptBind(string _strWhere, string _orderby)
    {
        this.page = AXRequest.GetQueryInt("page", 1);
        //txtKeywords.Text = this.keywords;
        tbl_sinkia_help bll = new tbl_sinkia_help();

        this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
        this.rptList.DataBind();

        //绑定页码
        txtPageNum.Text = this.pageSize.ToString();
        string pageUrl = Utils.CombUrlTxt("Help_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

        PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
Ejemplo n.º 5
0
    private bool DoAdd()
    {
        tbl_sinkia_help model = new tbl_sinkia_help();


        model.help1     = txtImgUrl_mob.Text;
        model.sort_id   = int.Parse(txtSortId.Text.Trim());
        model.help1_url = pid.Text;

        if (model.Add() > 0)
        {
            // mym.AddAdminLog("增加", "帮助中心:" + txttitle.Text); //记录日志
            return(true);
        }

        return(false);
    }
Ejemplo n.º 6
0
    //保存排序
    protected void btnSave_Click(object sender, EventArgs e)
    {
        tbl_sinkia_help bll     = new tbl_sinkia_help();
        Repeater        rptList = new Repeater();

        rptList = this.rptList;

        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());
        }

        mym.JscriptMsg(this.Page, " 排序保存成功", Utils.CombUrlTxt("Help_list.aspx", "keywords={0}&page={1}", this.keywords, this.page.ToString()), "Success");
    }