//Save Data
 private void SaveData()
 {
     Dashlet dashlet = new  Dashlet();
     bool flag = true;
     try
     {
             dashlet.Category = ddlCategory.SelectedValue;
             dashlet.Title = txtTitle.Text.Trim();
             dashlet.Link = txtLink.Text.Trim();
             dashlet.Icon = txtIcon.Attributes["key"];
             dashlet.Description = txtDescription.Text.Trim();
             dashlet.InstanceMethod = txtInstanceMethod.Text.Trim();
             dashlet.InstanceParameter = txtInstanceParameter.Text.Trim();
         using (_session = new Session())
         {
             if (IsAddNew())
             {
                 flag = dashlet.Create(_session);
             }
             else
             {
                dashlet.DashletId = int.Parse(this.hidDashletId.Value);
                flag = dashlet.Update(_session,  "Category",  "Title",  "Link",  "Icon",  "Description",  "InstanceMethod",  "InstanceParameter");
             }
         }
         this.hidDashletId.Value = dashlet.DashletId.ToString();
        if(flag)
             WebUtil.ShowMsg(this,"操作成功","提示");
        else
             WebUtil.ShowMsg(this,"操作失败","提示");
     }
     catch(UnauthorizedException ex)
     {
         WebUtil.ShowMsg(this,ex.Message,"警告");
     }
     catch(ApplicationException ex)
     {
         WebUtil.ShowMsg(this,ex.Message,"提示");
     }
     catch(Exception ex)
     {
         logger.Info("保存Dashlet", ex);
         WebUtil.ShowMsg(this, "发生未处理的异常,请刷新页面重新操作,或者联系系统管理员");
     }
 }