Example #1
0
        /// <summary>
        /// 增、改K_SysUser表

        /// </summary>
        /// <param Name="tranType">操作类型,NEW=增,EDIT=改</param>
        /// <param Name="paramsModel"></param>
        /// <returns>返回大于0的数字操作正常,返回非数字表示操作错误,返回的是系统错误说明</returns>
        public string Save(string tranType, KingTop.Model.SysManage.User paramsModel)
        {
            string isOk = "";

            try
            {
                SqlParameter returnValue = new SqlParameter("@ReturnValue", SqlDbType.Int, 4);
                returnValue.Direction = ParameterDirection.Output;

                string         cmdText = "proc_K_SysUserSave";
                SqlParameter[] paras   = new SqlParameter[] {
                    new SqlParameter("tranType", tranType),
                    new SqlParameter("UserID", paramsModel.UserID),
                    new SqlParameter("TrueName", paramsModel.TrueName),
                    new SqlParameter("Sex", paramsModel.Sex),
                    new SqlParameter("Birthday", paramsModel.Birthday),
                    new SqlParameter("Nation", paramsModel.Nation),
                    new SqlParameter("NativePlace", paramsModel.NativePlace),
                    new SqlParameter("MarriageState", paramsModel.MarriageState),
                    new SqlParameter("HomeAddress", paramsModel.HomeAddress),
                    new SqlParameter("CurrentAddress", paramsModel.CurrentAddress),
                    new SqlParameter("OfficePhone", paramsModel.OfficePhone),
                    new SqlParameter("Extension", paramsModel.Extension),
                    new SqlParameter("Mobile", paramsModel.Mobile),
                    new SqlParameter("HomePhone", paramsModel.HomePhone),
                    new SqlParameter("Fax", paramsModel.Fax),
                    new SqlParameter("Email", paramsModel.Email),
                    new SqlParameter("InputPerson", paramsModel.InputPerson),
                    new SqlParameter("InputID", paramsModel.InputID),
                    new SqlParameter("InputDate", paramsModel.InputDate),
                    new SqlParameter("Remark", paramsModel.Remark),
                    returnValue
                };

                SQLHelper.ExecuteNonQuery(SQLHelper.ConnectionStringLocalTransaction, CommandType.StoredProcedure, cmdText, paras);
                isOk = returnValue.Value.ToString();
            }
            catch (Exception ex)
            {
                isOk = ex.Message;
            }

            return(isOk);
        }
Example #2
0
        /// <summary>
        /// 增、改K_SysUser表

        /// </summary>
        /// <param name="tranType">操作类型,NEW=增,EDIT=改</param>
        /// <param name="AutModel"></param>
        /// <returns>返回大于0的数字操作正常,返回非数字表示操作错误,返回的是系统错误说明</returns>
        public string Save(string trantype, KingTop.Model.SysManage.User UserModel)
        {
            return(dal.Save(trantype, UserModel));
        }