/// <summary>
        /// 部分修改保存
        /// </summary>
        /// <param name="model">对象clsCompanyKind的一个实例参数</param>
        /// <returns></returns>
        public int UpdatePart(clsCompanyKind model, out string errMsg)
        {
            errMsg = string.Empty;
            int rtn = 0;

            try
            {
                sb.Length = 0;
                sb.Append("UPDATE TCOMPANYKIND SET ");
                sb.AppendFormat("StdCode='{0}',", model.StdCode);
                sb.AppendFormat("Name='{0}',", model.Name);
                sb.AppendFormat("CompanyProperty='{0}',", model.CompanyProperty);
                sb.AppendFormat("IsReadOnly={0},", model.IsReadOnly);
                sb.AppendFormat("IsLock={0},", model.IsLock);
                sb.AppendFormat("Remark='{0}'", model.Remark);
                sb.AppendFormat("Ksign='{0}'", model.Ksign);

                sb.AppendFormat(" WHERE SysCode='{0}',", model.SysCode);
                DataBase.ExecuteCommand(sb.ToString(), out errMsg);
                sb.Length = 0;
                rtn       = 1;
            }
            catch (Exception e)
            {
                //Log.WriteLog("更新clsCompanyKind",e);
                errMsg = e.Message;
            }

            return(rtn);
        }
        /// <summary>
        /// 插入一条明细记录
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int Insert(clsCompanyKind model, out string errMsg)
        {
            errMsg = string.Empty;
            int rtn = 0;

            try
            {
                sb.Length = 0;
                sb.Append("INSERT INTO tCompanyKind(SysCode,StdCode,Name,CompanyProperty,IsReadOnly,IsLock,Remark,Ksign)");
                sb.Append(" VALUES(");
                sb.AppendFormat("'{0}',", model.SysCode);
                sb.AppendFormat("'{0}',", model.StdCode);
                sb.AppendFormat("'{0}',", model.Name);
                sb.AppendFormat("'{0}',", model.CompanyProperty);
                sb.AppendFormat("{0},", model.IsReadOnly);
                sb.AppendFormat("{0},", model.IsLock);
                sb.AppendFormat("'{0}',", model.Remark);
                sb.AppendFormat("'{0}'", model.Ksign);
                sb.Append(")");
                DataBase.ExecuteCommand(sb.ToString(), out errMsg);
                sb.Length = 0;
                rtn       = 1;
            }
            catch (Exception e)
            {
                //Log.WriteLog("添加clsCompanyKind",e);
                errMsg = e.Message;
            }

            return(rtn);
        }