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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    SqlDataAdapter DataAdapter = new SqlDataAdapter(Command);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    SqlDataAdapter DataAdapter = new SqlDataAdapter(Command);

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