public void SaveItem()
 {
     string _navid = Parameters["navid"];
     string _colid = Parameters["pcolid"];
     string _colname = Parameters["pcolnam"];
     string _coltype = Parameters["pcoltype"];
     string _colurl = Parameters["pcolurl"];
     string _coltarget = Parameters["pcoltarget"];
     string _colvisible = Parameters["pcolvisible"];
     string _colorder = Parameters["pcolorder"];
     PortalChildColumn item = new PortalChildColumn();
     item.FChildColumnId = Convert.ToInt64(_colid);
     item.FChildColumnName = _colname;
     item.FChildColumnOrder = Convert.ToInt32(_colorder);
     item.FChildColumnTarget = _coltarget;
     item.FChildColumnType = _coltype;
     item.FChildColumnUrl = _colurl;
     item.FChildColumnVisible = _colvisible;
     item.FNavId = Convert.ToInt64(_navid);
     PortalChildColumnBiz biz = new PortalChildColumnBiz();
     ErrorEntity ErrInfo = new ErrorEntity();
     if (item.FChildColumnId == 0)
     {
         biz.Insert(item, out ErrInfo);
     }
     else
     {
         biz.Update(item, out ErrInfo);
     }
     Response.Write(ErrInfo.ToJson());
 }
 public void GetBackUrl()
 {
     string _id = Parameters["ccolid"];
     PortalChildColumn item = new PortalChildColumn();
     PortalChildColumnBiz biz = new PortalChildColumnBiz();
     item = biz.Select(Convert.ToInt64(_id));
     if (item == null)
     {
         Response.Write("0");
     }
     else
     {
         Response.Write(item.FNavId.ToString());
     }
 }
 public Int64 Insert(PortalChildColumn item, out ErrorEntity ErrInfo)
 {
     if (item.FNavId == 0)
     {
         ErrInfo = new ErrorEntity(RespCode.Cc010006);
         return -1;
     }
     if (string.IsNullOrEmpty(item.FChildColumnName))
     {
         ErrInfo = new ErrorEntity(RespCode.Cc010001);
         return -1;
     }
     if (string.IsNullOrEmpty(item.FChildColumnTarget))
     {
         ErrInfo = new ErrorEntity(RespCode.Cc010003);
         return -1;
     }
     if (string.IsNullOrEmpty(item.FChildColumnType))
     {
         ErrInfo = new ErrorEntity(RespCode.Cc010002);
         return -1;
     }
     if (item.FChildColumnOrder == 0)
     {
         ErrInfo = new ErrorEntity(RespCode.Cc010005);
         return -1;
     }
     if (!ChkNameRepeation(item.FChildColumnId, item.FNavId, item.FChildColumnName))
     {
         ErrInfo = new ErrorEntity(RespCode.Cc010004);
         return -1;
     }
     NameValueCollection parameters = new NameValueCollection();
     parameters.Add("FNavId", item.FNavId.ToString());
     parameters.Add("FChildColumnName", item.FChildColumnName);
     parameters.Add("FChildColumnType", item.FChildColumnType);
     parameters.Add("FChildColumnUrl", item.FChildColumnUrl);
     parameters.Add("FChildColumnTarget", item.FChildColumnTarget);
     parameters.Add("FChildColumnVisible", item.FChildColumnVisible);
     parameters.Add("FChildColumnOrder", item.FChildColumnOrder.ToString());
     return Insert(parameters, out ErrInfo);
 }