Exemple #1
0
        // RDO 11/30/2016
        // Inserts a community into lnkBonusPlanToCommunity
        public void BonusPlanToCommunityInsert()
        {
            using (SqlConnection Connection = new SqlConnection(ConfigurationManager.AppSettings["WebApplication"]))
            {
                using (SqlCommand Command = new SqlCommand("BonusPlan.BonusPlanToCommunityInsert", Connection))
                {
                    Command.CommandType    = CommandType.StoredProcedure;
                    Command.CommandTimeout = 600;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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