Example #1
0
 public void SaveItem()
 {
     string _columnid = Parameters["pcolumnid"];
     string _columnname = Parameters["pcolumnname"];
     string _columncontent = Parameters["pcolumncontent"];
     string _columntype = Parameters["pcolumntype"];
     string _columnurl = Parameters["pcolumnurl"];
     string _columntarget = Parameters["pcolumntarget"];
     string _columnvisible = Parameters["pcolumnvisible"];
     string _parentid = Parameters["pparentid"];
     string _order = Parameters["pcolumnorder"];
     PortalColumnBiz biz = new PortalColumnBiz();
     PortalColumn item = new PortalColumn();
     item.FColumnId = string.IsNullOrEmpty(_columnid) ? 0 : Convert.ToInt64(_columnid);
     item.FColumnName = _columnname;
     item.FColumnContent = _columncontent;
     item.FColumnType = _columntype;
     item.FColumnUrl = _columnurl;
     item.FColumnTarget = _columntarget;
     item.FColumnVisible = _columnvisible;
     item.FParentColumnId = string.IsNullOrEmpty(_parentid) ? 0 : Convert.ToInt64(_parentid);
     item.FColumnOrder = Convert.ToInt32(_order);
     ErrorEntity ErrInfo = new ErrorEntity();
     if (item.FColumnId == 0)
     {
         biz.Insert(item, out ErrInfo);
     }
     else
     {
         biz.Update(item, out ErrInfo);
     }
     Response.Write(ErrInfo.ToJson());
 }