Beispiel #1
0
    private void ShowInfo(int _id)
    {
        Cms.BLL.C_model   bll   = new Cms.BLL.C_model();
        Cms.Model.C_model model = bll.GetModel(_id);


        txtTitle.Text = model.modelName;
    }
Beispiel #2
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        // ChkAdminLevel("channel_" + this.channel_name + "_category", DTEnums.ActionEnum.Delete.ToString()); //检查权限
        Cms.BLL.C_model bll = new Cms.BLL.C_model();
        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)
            {
               
                adminUser.AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "删除" + bll.GetModel(id).modelName); //记录日志
                bll.Delete(id);
            }

        }
        
        JscriptMsg("删除数据成功!", Utils.CombUrlTxt("model_list.aspx", "channel_id={0}", this.channel_id.ToString()), "Success");
    }
Beispiel #3
0
    private bool DoEdit(int _id)
    {
        try
        {
            Cms.BLL.C_model   bll   = new Cms.BLL.C_model();
            Cms.Model.C_model model = bll.GetModel(_id);
            model.modelName  = txtTitle.Text.Trim();
            model.modelValue = txtTitle.Text.Trim();

            if (bll.Update(model))
            {
                adminUser.AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "[" + model.modelName + "]"); //记录日志
                return(true);
            }
        }
        catch
        {
            return(false);
        }
        return(false);
    }