Example #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;
    }
Example #2
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);
    }
Example #3
0
    private bool DoAdd()
    {
        try
        {
            Cms.Model.C_model model = new Cms.Model.C_model();
            Cms.BLL.C_model   bll   = new Cms.BLL.C_model();

            model.modelName  = txtTitle.Text.Trim();
            model.modelValue = txtTitle.Text.Trim();
            if (bll.Add(model) > 0)
            {
                adminUser.AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "[" + model.modelName + "]"); //记录日志
                return(true);
            }
        }
        catch
        {
            return(false);
        }
        return(false);
    }
Example #4
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Cms.Model.C_model model)
 {
     return(dal.Update(model));
 }
Example #5
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(Cms.Model.C_model model)
 {
     return(dal.Add(model));
 }