public CampaignController()
        {
            string connectionString = ConfigurationManager.ConnectionStrings["Datasource"].ConnectionString;
            string logFile          = ConfigurationManager.AppSettings["LogFile"];

            _CampaignDataAccess = new CampaignDataAccess(connectionString, logFile);
        }
示例#2
0
        public int SaveCampaign(Entity.Sales.Campaign Model)
        {
            CampaignDbModel DbModel = new CampaignDbModel();

            Model.CopyPropertiesTo(DbModel);
            return(CampaignDataAccess.SaveCampaign(DbModel));
        }
        public List <Entity.Sales.GetCampaign> GetAllCampaign(Entity.Sales.GetCampaignParam Param)
        {
            List <Entity.Sales.GetCampaign> CampaignList = new List <Entity.Sales.GetCampaign>();
            GetCampaignParamDbModel         p            = new GetCampaignParamDbModel();

            Param.CopyPropertiesTo(p);
            CampaignDataAccess.GetAllCampaigns(p).CopyListTo(CampaignList);
            return(CampaignList);
        }
示例#4
0
 public int DeleteCampaign(int Id)
 {
     return(CampaignDataAccess.DeleteCampaign(Id));
 }
示例#5
0
 public Entity.Sales.Campaign GetCampaignById(int Id)
 {
     Entity.Sales.Campaign Campaign = new Entity.Sales.Campaign();
     CampaignDataAccess.GetCampaignById(Id).CopyPropertiesTo(Campaign);
     return(Campaign);
 }
示例#6
0
 public Campaign()
 {
     campaignDataAccess = new CampaignDataAccess();
 }