コード例 #1
0
        public int CreateCampaign_Insert_Update_Delete(BAL_CreateCampaign bcreatecamp)
        {
            try
            {

                con.Open();
                cmd = new SqlCommand("SP_CreateCampaign", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Flag", 1);
                cmd.Parameters.AddWithValue("@CampaignName", bcreatecamp.CampaignName);
                cmd.Parameters.AddWithValue("@CampaignType", bcreatecamp.CampaignType);
                cmd.Parameters.AddWithValue("@StartDate", bcreatecamp.StartDate);
                cmd.Parameters.AddWithValue("@EndDate", bcreatecamp.EndDate);
                cmd.Parameters.AddWithValue("@ExpectedRevenue", bcreatecamp.ExpectedRevenue);
                cmd.Parameters.AddWithValue("@BudgetedCost", bcreatecamp.BudgetedCost);
                cmd.Parameters.AddWithValue("@Status", bcreatecamp.Status);
                cmd.Parameters.AddWithValue("@ExpectedResponse", bcreatecamp.ExpectedResponse);
                cmd.Parameters.AddWithValue("@Description", bcreatecamp.Description);
                cmd.Parameters.AddWithValue("@S_Status", bcreatecamp.S_Status);
                cmd.Parameters.AddWithValue("@C_Date", bcreatecamp.C_Date);
                int i = cmd.ExecuteNonQuery();
                return i;
            }
            catch (Exception)
            {

                throw;
            }
            finally { con.Close(); }
        }
コード例 #2
0
        public int DeleteCreateCampaign_Notes_Insert_Update_Delete(BAL_CreateCampaign bcreatecamp)
        {
            try
            {

                con.Open();
                cmd = new SqlCommand("SP_CreateCampaignNotesDelete", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Flag", 1);
                cmd.Parameters.AddWithValue("@CampaignId", bcreatecamp.LCampaignID);
                int i = cmd.ExecuteNonQuery();
                return i;
            }
            catch (Exception)
            {

                throw;
            }
            finally { con.Close(); }
        }
コード例 #3
0
        public int UpdateMassCreateLeadCampaign_Insert_Update_Delete(BAL_CreateCampaign bcreatecamp)
        {
            try
            {

                con.Open();
                cmd = new SqlCommand("SP_MassCampaignLeadsUpdate", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Flag", 1);
                cmd.Parameters.AddWithValue("@MassCampID", bcreatecamp.MassCampID);
                cmd.Parameters.AddWithValue("@Status", bcreatecamp.Status);
                cmd.Parameters.AddWithValue("@S_Status", bcreatecamp.S_Status);
                cmd.Parameters.AddWithValue("@C_Date", bcreatecamp.C_Date);
                int i = cmd.ExecuteNonQuery();
                return i;
            }
            catch (Exception)
            {

                throw;
            }
            finally { con.Close(); }
        }