コード例 #1
0
        /// <summary>
        /// 添加内部转账信息
        /// </summary>
        /// <param name="model"></param>
        /// <param name="ID"></param>
        /// <returns></returns>
        public static bool InSertInsideChangeAccoInfo(InSideChangeAccoModel model, out int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.AppendLine("insert into officedba.InSideChangeAcco(");
            strSql.AppendLine("CompanyCD,ChangeNo,ChangeBillNum,ChangeDate,InAccountNo,InBankName,OutAccountNo,OutBankName,TotalPrice,Executor,Summary,ConfirmStatus,IsAccount,CurrencyType,CurrencyRate)");
            strSql.AppendLine(" values (");
            strSql.AppendLine("@CompanyCD,@ChangeNo,@ChangeBillNum,@ChangeDate,@InAccountNo,@InBankName,@OutAccountNo,@OutBankName,@TotalPrice,@Executor,@Summary,@ConfirmStatus,@IsAccount,@CurrencyType,@CurrencyRate)");
            strSql.AppendLine("set @IntID= @@IDENTITY");

            SqlParameter[] parms = new SqlParameter[16];
            parms[0]  = SqlHelper.GetParameter("@CompanyCD", model.CompanyCD);
            parms[1]  = SqlHelper.GetParameter("@ChangeNo", model.ChangeNo);
            parms[2]  = SqlHelper.GetParameter("@ChangeBillNum", model.ChangeBillNum);
            parms[3]  = SqlHelper.GetParameter("@ChangeDate", model.ChangeDate);
            parms[4]  = SqlHelper.GetParameter("@InAccountNo", model.InAccountNo);
            parms[5]  = SqlHelper.GetParameter("@InBankName", model.InBankName);
            parms[6]  = SqlHelper.GetParameter("@OutAccountNo", model.OutAccountNo);
            parms[7]  = SqlHelper.GetParameter("@OutBankName", model.OutBankName);
            parms[8]  = SqlHelper.GetParameter("@TotalPrice", model.TotalPrice);
            parms[9]  = SqlHelper.GetParameter("@Executor", model.Executor);
            parms[10] = SqlHelper.GetParameter("@Summary", model.Summary);
            parms[11] = SqlHelper.GetParameter("@ConfirmStatus", model.ConfirmStatus);
            parms[12] = SqlHelper.GetParameter("@IsAccount", model.IsAccount);
            parms[13] = SqlHelper.GetParameter("@CurrencyType", model.CurrencyType);
            parms[14] = SqlHelper.GetParameter("@CurrencyRate", model.CurrencyRate);
            parms[15] = SqlHelper.GetOutputParameter("@IntID", SqlDbType.Int);

            SqlHelper.ExecuteTransSql(strSql.ToString(), parms);
            ID = Convert.ToInt32(parms[15].Value);
            return(SqlHelper.Result.OprateCount > 0 ? true : false);
        }
コード例 #2
0
        /// <summary>
        /// 添加内部转账信息
        /// </summary>
        /// <param name="model"></param>
        /// <param name="ID"></param>
        /// <returns></returns>
        public static bool InSertInsideChangeAccoInfo(InSideChangeAccoModel model, out int ID)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            try
            {
                bool suuc = InSideChangeAccoDBHelper.InSertInsideChangeAccoInfo(model, out ID);


                string       loginUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID;
                LogInfoModel logModel    = InitLogInfo(ID.ToString());
                logModel.Element    = ConstUtil.LOG_PROCESS_INSERT;
                logModel.ObjectName = ConstUtil.CODING_RULE_TABLE_INSIDECHANGEACCO;
                if (suuc)
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS;
                }
                else
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_FAILED;
                }

                LogDBHelper.InsertLog(logModel);

                return(suuc);
            }
            catch (Exception ex)
            {
                WriteSystemLog(userInfo, ex);
                throw ex;
            }
        }
コード例 #3
0
        /// <summary>
        /// 修改内部转账信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool UpdateInsideChangeAccoInfo(InSideChangeAccoModel model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.AppendLine("update officedba.InSideChangeAcco set ");
            strSql.AppendLine("CompanyCD=@CompanyCD,");
            strSql.AppendLine("ChangeNo=@ChangeNo,");
            strSql.AppendLine("ChangeBillNum=@ChangeBillNum,");
            strSql.AppendLine("ChangeDate=@ChangeDate,");
            strSql.AppendLine("InAccountNo=@InAccountNo,");
            strSql.AppendLine("InBankName=@InBankName,");
            strSql.AppendLine("OutAccountNo=@OutAccountNo,");
            strSql.AppendLine("OutBankName=@OutBankName,");
            strSql.AppendLine("TotalPrice=@TotalPrice,");
            strSql.AppendLine("Executor=@Executor,");
            strSql.AppendLine("Summary=@Summary,");
            strSql.AppendLine("ModifiedDate=@ModifiedDate,");
            strSql.AppendLine("ModifiedUserID=@ModifiedUserID,CurrencyType=@CurrencyType,CurrencyRate=@CurrencyRate");
            strSql.AppendLine(" where ID=@ID");

            SqlParameter[] parms = new SqlParameter[16];
            parms[0]  = SqlHelper.GetParameter("@CompanyCD", model.CompanyCD);
            parms[1]  = SqlHelper.GetParameter("@ChangeNo", model.ChangeNo);
            parms[2]  = SqlHelper.GetParameter("@ChangeBillNum", model.ChangeBillNum);
            parms[3]  = SqlHelper.GetParameter("@ChangeDate", model.ChangeDate);
            parms[4]  = SqlHelper.GetParameter("@InAccountNo", model.InAccountNo);
            parms[5]  = SqlHelper.GetParameter("@InBankName", model.InBankName);
            parms[6]  = SqlHelper.GetParameter("@OutAccountNo", model.OutAccountNo);
            parms[7]  = SqlHelper.GetParameter("@OutBankName", model.OutBankName);
            parms[8]  = SqlHelper.GetParameter("@TotalPrice", model.TotalPrice);
            parms[9]  = SqlHelper.GetParameter("@Executor", model.Executor);
            parms[10] = SqlHelper.GetParameter("@Summary", model.Summary);
            parms[11] = SqlHelper.GetParameter("@ModifiedDate", model.ModifiedDate);
            parms[12] = SqlHelper.GetParameter("@ModifiedUserID", model.ModifiedUserID);
            parms[13] = SqlHelper.GetParameter("@CurrencyType", model.CurrencyType);
            parms[14] = SqlHelper.GetParameter("@CurrencyRate", model.CurrencyRate);
            parms[15] = SqlHelper.GetParameter("@ID", model.ID);

            SqlHelper.ExecuteTransSql(strSql.ToString(), parms);
            return(SqlHelper.Result.OprateCount > 0 ? true : false);
        }