protected void btnUpdate_Click(object sender, EventArgs e)
        {
            SolutionCategoryBll scbll = new SolutionCategoryBll();
            int scenceId = int.Parse(lblSenceId.Text);
            int cateId = int.Parse(lblCateId.Text);
            SolutionCategoryModel scmodel = scbll.GetModel(scenceId, cateId);
            if (scmodel == null)
            {
                scmodel = new SolutionCategoryModel();
                scmodel.CateId = cateId;
                scmodel.SenceId = scenceId;
            }
            scmodel.IsShow = chkIsShow.Checked;
            scmodel.Remark = txtRemark.Text.Trim();
            scmodel.Position = txtPosition.Text.Trim();
            string fullurl, shorturl, message;
            if (CommonImageUpload.Upload(this.fulImage, out fullurl, out shorturl, out message))
            {
                scmodel.CateImage = shorturl;
            }

            scbll.Save(scmodel);
            SaveCateConditions();
            Response.Redirect("ShowClassicalScence.aspx?id=" + scenceId,true);
        }
 /// <summary>
 /// ����ʵ�������
 /// </summary>
 public SolutionCategoryModel ReaderBind(IDataReader dataReader)
 {
     SolutionCategoryModel model=new SolutionCategoryModel();
     object ojb;
     ojb = dataReader["SenceId"];
     if(ojb != null && ojb != DBNull.Value)
     {
         model.SenceId=(int)ojb;
     }
     ojb = dataReader["CateId"];
     if(ojb != null && ojb != DBNull.Value)
     {
         model.CateId=(int)ojb;
     }
     model.CateImage= dataReader["CateImage"].ToString();
     model.Remark=dataReader["Remark"].ToString();
     model.Position=dataReader["Position"].ToString();
     model.CateName = dataReader["catename"].ToString();
     ojb = dataReader["IsShow"];
     if(ojb != null && ojb != DBNull.Value)
     {
         model.IsShow=(bool)ojb;
     }
     return model;
 }
 /// <summary>
 ///  ����һ������
 /// </summary>
 public void Save(SolutionCategoryModel model)
 {
     DbCommand dbCommand = dbw.GetStoredProcCommand("UP_slCategory_Save");
     dbw.AddInParameter(dbCommand, "SenceId", DbType.Int32, model.SenceId);
     dbw.AddInParameter(dbCommand, "CateId", DbType.Int32, model.CateId);
     dbw.AddInParameter(dbCommand, "CateImage", DbType.AnsiString, model.CateImage);
     dbw.AddInParameter(dbCommand, "Remark", DbType.AnsiString, model.Remark);
     dbw.AddInParameter(dbCommand, "Position", DbType.AnsiString, model.Position);
     dbw.AddInParameter(dbCommand, "IsShow", DbType.Boolean, model.IsShow);
     dbw.ExecuteNonQuery(dbCommand);
 }
 /// <summary>
 /// ����һ������
 /// </summary>
 public void Save(SolutionCategoryModel model)
 {
     dal.Save(model);
 }