public bool Update(CmMstInfoItem item)
 {
     if (item == null)
     {
         throw new ArgumentNullException("item");
     }
     bool ret = SetData(item);
     return ret;
 }
        private bool SetData(CmMstInfoItem item)
        {
            bool IsSaved = false;
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return IsSaved;

                }
                int flag = (int)Cm.MstInfoItem.SetData(pclsCache.CacheConnectionObject, item.CategoryCode, item.Code, item.Name, item.ParentCode, item.SortNo, item.StartDate, item.EndDate, item.GroupHeaderFlag, item.ControlType, item.OptionCategory, item.RevUserId, item.TerminalName, item.TerminalIP, item.DeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return IsSaved;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstInfoItem.SetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return IsSaved;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public HttpResponseMessage Put(CmMstInfoItem item)
 {
     bool ret = repository.Update(item);
     return new ExceptionHandler().SetData(ret);
 }