コード例 #1
0
        public void ApprovalUpdate()
        {
            using (SqlConnection Connection = new SqlConnection(ConfigurationManager.AppSettings["WebApplication"]))
            {
                using (SqlCommand Command = new SqlCommand("BonusPlan.ApprovalUpdate", Connection))
                {
                    Command.CommandType    = CommandType.StoredProcedure;
                    Command.CommandTimeout = 600;

                    Command.Parameters.Add("@PaymentToApprovalID", SqlDbType.Int);
                    Command.Parameters["@PaymentToApprovalID"].Value = PaymentToApprovalID;

                    Command.Parameters.Add("@ModifyBy", SqlDbType.VarChar);
                    Command.Parameters["@ModifyBy"].Value = Audit.UserName;

                    Command.Parameters.Add("@ApproveFlg", SqlDbType.Int);
                    Command.Parameters["@ApproveFlg"].Value = ApproveFlg.NullIfEmpty();

                    Command.Parameters.Add("@DenyFlg", SqlDbType.Int);
                    Command.Parameters["@DenyFlg"].Value = DenyFlg.NullIfEmpty();

                    Command.Parameters.Add("@ExceptionFlg", SqlDbType.Int);
                    Command.Parameters["@ExceptionFlg"].Value = ExceptionFlg.NullIfEmpty();

                    Command.Parameters.Add("@ExceptionNote", SqlDbType.VarChar);
                    Command.Parameters["@ExceptionNote"].Value = ExceptionNote.NullIfEmpty();

                    Connection.Open();
                    Command.ExecuteNonQuery();
                }
            }
        }
コード例 #2
0
        public void ApprovalManagementUpdate()
        {
            using (SqlConnection Connection = new SqlConnection(ConfigurationManager.AppSettings["WebApplication"]))
            {
                using (SqlCommand Command = new SqlCommand("BonusPlan.ApprovalManagementUpdate", Connection))
                {
                    Command.CommandType    = CommandType.StoredProcedure;
                    Command.CommandTimeout = 600;

                    Command.Parameters.Add("@PaymentToApprovalID", SqlDbType.Int);
                    Command.Parameters["@PaymentToApprovalID"].Value = PaymentToApprovalID.NullIfEmpty();

                    Command.Parameters.Add("@UsernameAlternate", SqlDbType.VarChar);
                    Command.Parameters["@UsernameAlternate"].Value = UsernameAlternate.NullIfEmpty();

                    Command.Parameters.Add("@JobCategoryID", SqlDbType.Int);
                    Command.Parameters["@JobCategoryID"].Value = JobCategoryID.NullIfEmpty();

                    Command.Parameters.Add("@JobCategoryIDAlternate", SqlDbType.Int);
                    Command.Parameters["@JobCategoryIDAlternate"].Value = JobCategoryIDAlternate.NullIfEmpty();

                    Command.Parameters.Add("@Sort", SqlDbType.Int);
                    Command.Parameters["@Sort"].Value = Sort.NullIfEmpty();

                    Command.Parameters.Add("@ApproveFlg", SqlDbType.Int);
                    Command.Parameters["@ApproveFlg"].Value = ApproveFlg.NullIfEmpty();

                    Command.Parameters.Add("@DenyFlg", SqlDbType.Int);
                    Command.Parameters["@DenyFlg"].Value = DenyFlg.NullIfEmpty();

                    Command.Parameters.Add("@ExceptionFlg", SqlDbType.Int);
                    Command.Parameters["@ExceptionFlg"].Value = ExceptionFlg.NullIfEmpty();

                    Command.Parameters.Add("@ExceptionNote", SqlDbType.VarChar);
                    Command.Parameters["@ExceptionNote"].Value = ExceptionNote.NullIfEmpty();

                    Command.Parameters.Add("@AdministrationNote", SqlDbType.VarChar);
                    Command.Parameters["@AdministrationNote"].Value = AdministrationNote.NullIfEmpty();

                    Command.Parameters.Add("@OverrideFlg", SqlDbType.Int);
                    Command.Parameters["@OverrideFlg"].Value = OverrideFlg.NullIfEmpty();

                    Command.Parameters.Add("@ModifyBy", SqlDbType.VarChar);
                    Command.Parameters["@ModifyBy"].Value = Audit.ModifyBy.NullIfEmpty();

                    Command.Parameters.Add("@ActiveFlg", SqlDbType.Int);
                    Command.Parameters["@ActiveFlg"].Value = Audit.ActiveFlg.NullIfEmpty();

                    Connection.Open();
                    Command.ExecuteNonQuery();
                }
            }
        }