コード例 #1
0
 public List <Model.Campaign> CampaignInfo(Model.Campaign request)
 {
     try
     {
         CampaignBO campaignBO = new CampaignBO();
         return(campaignBO.CampaignInfo(request));
     }
     catch (Exception ex)
     {
         Error.WriteException(TraceEventType.Error, ex.Message.ToString(), "CampaignMod");
         throw;
     }
 }
コード例 #2
0
        private void DeleteByCampaignType(Model.Campaign request)
        {
            try
            {
                Model.CampaignMainFrame campaignMainFrame    = new Model.CampaignMainFrame();
                CampaignMainFrameDAO    campaignMainFrameDAO = new CampaignMainFrameDAO();
                campaignMainFrame.CampaignId = request.CampaignId;
                campaignMainFrame            = campaignMainFrameDAO.CampaignMainFrameInq(campaignMainFrame);

                if (campaignMainFrame != null)
                {
                    campaignMainFrameDAO.CampaignMainFrameDel(campaignMainFrame);
                }

                Model.CampaignFollowUp campaignFollowUp    = new Model.CampaignFollowUp();
                CampaignFollowUpDAO    campaignFollowUpDAO = new CampaignFollowUpDAO();
                campaignFollowUp.CampaignId = request.CampaignId;
                campaignFollowUp            = campaignFollowUpDAO.CampaignFollowUpInq(campaignFollowUp);

                if (campaignFollowUp != null)
                {
                    campaignFollowUpDAO.CampaignFollowUpDel(campaignFollowUp);
                }

                Model.CampaignTargetFileProvider campaignTargetFileProvider    = new Model.CampaignTargetFileProvider();
                CampaignTargetFileProviderDAO    campaignTargetFileProviderDAO = new CampaignTargetFileProviderDAO();
                campaignTargetFileProvider.CampaignId = request.CampaignId;
                campaignTargetFileProvider            = campaignTargetFileProviderDAO.CampaigTargetFileInq(campaignTargetFileProvider);

                if (campaignTargetFileProvider != null)
                {
                    campaignTargetFileProviderDAO.CampaigTargetFileDel(campaignTargetFileProvider);
                }
            }
            catch (Exception ex)
            {
                Error.WriteException(TraceEventType.Error, ex.Message.ToString(), "DeleteByCampaignType-BO");
                throw new Exception(ex.Message.ToString());
            }
        }
コード例 #3
0
        /// <summary>
        /// CampaignView Section is the Integration part of the CampaignInfo, Targetfile Provider, Followup
        /// Mainframe and Left Navigaton section
        /// </summary>
        /// <returns></returns>
        public ActionResult CampaignView(int?CampaignId)
        {
            if (CampaignId == null)
            {
                CampaignId = 0;
            }
            Session["CampaignId"] = CampaignId;
            ACM.Model.Campaign campaign = new ACM.Model.Campaign();
            campaign.CampaignId = Convert.ToInt32(CampaignId);
            var campaignInq = campaignServiceClient.CampaignInq(campaign);

            if (campaignInq == null)
            {
                campaignInq = new Model.Campaign();
            }
            if (CampaignId == 0)
            {
                ViewBag.ViewMode = "Add";
            }
            Session["Note"] = campaignInq.Notes;
            return(View(campaignInq));
        }
コード例 #4
0
        public ActionResult CampaignInfoSection(ACM.Model.Campaign cmp)
        {
            ViewBag.disablecontrols = false;

            ACM.Model.Campaign campaign = new ACM.Model.Campaign();
            campaign.CampaignId = Convert.ToInt32(cmp.CampaignId);

            var campaignInq = campaignServiceClient.CampaignInq(campaign);


            var campaigntypelist = campaignServiceClient.GetMasterDropDownDataforMasterTables("CampaignTypeId", "CampaignTypeName", "CampaignType");

            ViewBag.campaigntypelist = new SelectList(campaigntypelist, "ID", "Name");

            var loblist = campaignServiceClient.GetMasterDropDownDataforMasterTables("LOBId", "LOBName", "LOB");

            ViewBag.loblist = new SelectList(loblist, "ID", "Name");

            var primarypmlist = campaignServiceClient.GetMasterDropDownDataforMasterTables("UserID", "FirstName+ '  ' +LastName", "Users");

            ViewBag.primarypmlist = new SelectList(primarypmlist, "ID", "Name");

            var secondarypmlist = campaignServiceClient.GetMasterDropDownDataforMasterTables("UserID", "FirstName+ '  ' +LastName", "Users");

            ViewBag.secondarypmlist = new SelectList(secondarypmlist, "ID", "Name");

            var promobuttontypelist = campaignServiceClient.GetMasterDropDownDataforMasterTables("PromoButtonTypeId", "PromoButtonName", "PromoButton");

            ViewBag.promobuttontypelist = new SelectList(promobuttontypelist, "ID", "Name");


            var productplacementlist = campaignServiceClient.GetMasterDropDownDataforMasterTables("ProductPlacementId", "Description", "ProductPlacement");

            ViewBag.productplacementlist = new SelectList(productplacementlist, "ID", "Name");

            var supercategory = campaignServiceClient.GetMasterDropDownDataforMasterTables("SuperCategoryID", "SuperCategoryName", "SuperCategory");

            ViewBag.supercategory = new SelectList(supercategory, "ID", "Name");


            var campaignType = campaignServiceClient.GetMasterDropDownDataforMasterTables("SuperCategoryID", "SuperCategoryName", "SuperCategory");

            ViewBag.supercategory = new SelectList(campaignType, "ID", "Name");

            var campaignTableStatuslist = campaignServiceClient.GetMasterDropDownDataforMasterTables("CampaignTableStatusId", "CampaignTableStatusDescription", "CampaignTableStatus");

            ViewBag.campaignTableStatuslist = new SelectList(campaignTableStatuslist, "ID", "Name");

            var category = campaignServiceClient.GetMasterDropDownDataforMasterTables("CategoryID", "CategoryName", "Category");

            ViewBag.category = new SelectList(category, "ID", "Name");
            if (campaignInq != null)
            {
                if (campaignInq.CategoryId != null)
                {
                    ViewBag.categoryName = category.Find(x => x.ID == campaignInq.CategoryId).Name;
                }
            }


            var subcategory = campaignServiceClient.GetMasterDropDownDataforMasterTables("SubCategoryID", "SubCategoryName", "SubCategory");

            ViewBag.subcategory = new SelectList(subcategory, "ID", "Name");
            if (campaignInq != null)
            {
                if (campaignInq.SubCategoryId != null)
                {
                    ViewBag.subCategoryName = subcategory.Find(x => x.ID == campaignInq.SubCategoryId).Name;
                }
            }

            var campaignTableStatusList = campaignServiceClient.GetMasterDropDownDataforMasterTables("CampaignTableStatusId", "CampaignTableStatusDescription", "CampaignTableStatus");

            ViewBag.campaignTableStatusList = new SelectList(campaignTableStatusList, "ID", "Name");



            var requestorlist = campaignServiceClient.GetMasterDropDownDataforMasterTables("UserID", "FirstName+ '  ' +LastName", "Users");

            ViewBag.requestorlist = new SelectList(requestorlist, "ID", "Name");



            var eventTrigger = campaignServiceClient.GetMasterDropDownDataforMasterTables("EventTriggerId", "EventTriggerName", "EventTrigger");

            ViewBag.eventTrigger = new SelectList(eventTrigger, "ID", "Name");


            //  var campaign = cmpbo.GetCampaign(100);
            if (campaignInq == null)
            {
                campaignInq = new Model.Campaign();
                CampaignTableStatu campaignTableStatu = new CampaignTableStatu();
                campaignInq.CampaignTableStatu = campaignTableStatu;
            }


            if (campaignInq.CampaignTypeId != null)
            {
                var campaignTypeValue = campaigntypelist.Find(x => x.ID == campaignInq.CampaignTypeId);
                ViewBag.campaignTypeName = campaignTypeValue.Name;
                ViewBag.campaignTypeId   = campaignInq.CampaignTypeId;
            }


            return(PartialView(campaignInq));
        }
コード例 #5
0
 /// <summary>
 /// Adds new entity.
 /// </summary>
 /// <returns>
 /// The result of the call.
 /// </returns>
 public INewCalled New(Model.Campaign entity)
 {
     return(new NewCampaignRequestBuilder(this.ConfigurationProvider, entity));
 }
コード例 #6
0
 public void DeleteCampaign(Model.Campaign C)
 {
     _db.Campaigns.Remove(C);
     _db.SaveChanges();
 }
コード例 #7
0
 public void AddCampaign(Model.Campaign C)
 {
     _db.Campaigns.Local.Add(C);
     _db.SaveChanges();
 }
コード例 #8
0
        public string CampaignMod(Model.Campaign request)
        {
            CampaignBO campaignBO = new CampaignBO();

            return(campaignBO.CampaignMod(request));
        }
コード例 #9
0
        public ACM.Model.Campaign CampaignAdd(Model.Campaign request)
        {
            CampaignBO campaignBO = new CampaignBO();

            return(campaignBO.CampaignAdd(request));
        }
コード例 #10
0
        public Model.Campaign CampaignInq(Model.Campaign request)
        {
            CampaignBO campaignBO = new CampaignBO();

            return(campaignBO.CampaignInq(request));
        }
コード例 #11
0
        public List <Model.Campaign> CampaignInfo(Model.Campaign request)
        {
            CampaignBO campaignBO = new CampaignBO();

            return(campaignBO.CampaignInfo(request));
        }
コード例 #12
0
        public ActionResult CampaignInfoSection(ACM.Model.Campaign cmp)
        {
            ViewBag.disablecontrols = false;

            ACM.Model.Campaign campaign = new ACM.Model.Campaign();
            campaign.CampaignId = Convert.ToInt32(cmp.CampaignId);

            var campaignInq = campaignServiceClient.CampaignInq(campaign);

            var campaigntypelist = campaignServiceClient.GetMasterDropDownDataforMasterTables("CampaignTypeId", "CampaignTypeName", "CampaignType");
            ViewBag.campaigntypelist = new SelectList(campaigntypelist, "ID", "Name");

            var loblist = campaignServiceClient.GetMasterDropDownDataforMasterTables("LOBId", "LOBName", "LOB");
            ViewBag.loblist = new SelectList(loblist, "ID", "Name");

            var primarypmlist = campaignServiceClient.GetMasterDropDownDataforMasterTables("UserID", "FirstName+ '  ' +LastName", "Users");
            ViewBag.primarypmlist = new SelectList(primarypmlist, "ID", "Name");

            var secondarypmlist = campaignServiceClient.GetMasterDropDownDataforMasterTables("UserID", "FirstName+ '  ' +LastName", "Users");
            ViewBag.secondarypmlist = new SelectList(secondarypmlist, "ID", "Name");

            var promobuttontypelist = campaignServiceClient.GetMasterDropDownDataforMasterTables("PromoButtonTypeId", "PromoButtonName", "PromoButton");
            ViewBag.promobuttontypelist = new SelectList(promobuttontypelist, "ID", "Name");

            var productplacementlist = campaignServiceClient.GetMasterDropDownDataforMasterTables("ProductPlacementId", "Description", "ProductPlacement");
            ViewBag.productplacementlist = new SelectList(productplacementlist, "ID", "Name");

            var supercategory = campaignServiceClient.GetMasterDropDownDataforMasterTables("SuperCategoryID", "SuperCategoryName", "SuperCategory");
            ViewBag.supercategory = new SelectList(supercategory, "ID", "Name");

            var campaignType = campaignServiceClient.GetMasterDropDownDataforMasterTables("SuperCategoryID", "SuperCategoryName", "SuperCategory");
            ViewBag.supercategory = new SelectList(campaignType, "ID", "Name");

            var campaignTableStatuslist = campaignServiceClient.GetMasterDropDownDataforMasterTables("CampaignTableStatusId", "CampaignTableStatusDescription", "CampaignTableStatus");
            ViewBag.campaignTableStatuslist = new SelectList(campaignTableStatuslist, "ID", "Name");

            var category = campaignServiceClient.GetMasterDropDownDataforMasterTables("CategoryID", "CategoryName", "Category");
            ViewBag.category = new SelectList(category, "ID", "Name");
            if (campaignInq != null)
            {
                if (campaignInq.CategoryId != null)
                {
                    ViewBag.categoryName = category.Find(x => x.ID == campaignInq.CategoryId).Name;
                }
            }

            var subcategory = campaignServiceClient.GetMasterDropDownDataforMasterTables("SubCategoryID", "SubCategoryName", "SubCategory");
            ViewBag.subcategory = new SelectList(subcategory, "ID", "Name");
            if (campaignInq != null)
            {
                if (campaignInq.SubCategoryId != null)
                {
                    ViewBag.subCategoryName = subcategory.Find(x => x.ID == campaignInq.SubCategoryId).Name;
                }
            }

            var campaignTableStatusList = campaignServiceClient.GetMasterDropDownDataforMasterTables("CampaignTableStatusId", "CampaignTableStatusDescription", "CampaignTableStatus");
            ViewBag.campaignTableStatusList = new SelectList(campaignTableStatusList, "ID", "Name");

            var requestorlist = campaignServiceClient.GetMasterDropDownDataforMasterTables("UserID", "FirstName+ '  ' +LastName", "Users");
            ViewBag.requestorlist = new SelectList(requestorlist, "ID", "Name");

            var eventTrigger = campaignServiceClient.GetMasterDropDownDataforMasterTables("EventTriggerId", "EventTriggerName", "EventTrigger");
            ViewBag.eventTrigger = new SelectList(eventTrigger, "ID", "Name");

            //  var campaign = cmpbo.GetCampaign(100);
            if (campaignInq == null)
            {
                campaignInq = new Model.Campaign();
                CampaignTableStatu campaignTableStatu = new CampaignTableStatu();
                campaignInq.CampaignTableStatu = campaignTableStatu;
            }

            if (campaignInq.CampaignTypeId != null)
            {
                var campaignTypeValue = campaigntypelist.Find(x => x.ID == campaignInq.CampaignTypeId);
                ViewBag.campaignTypeName = campaignTypeValue.Name;
                ViewBag.campaignTypeId = campaignInq.CampaignTypeId;
            }

            return PartialView(campaignInq);
        }
コード例 #13
0
 /// <summary>
 /// CampaignView Section is the Integration part of the CampaignInfo, Targetfile Provider, Followup
 /// Mainframe and Left Navigaton section
 /// </summary>
 /// <returns></returns>
 public ActionResult CampaignView(int? CampaignId)
 {
     if (CampaignId == null) CampaignId = 0;
     Session["CampaignId"] = CampaignId;
     ACM.Model.Campaign campaign = new ACM.Model.Campaign();
     campaign.CampaignId = Convert.ToInt32(CampaignId);
     var campaignInq = campaignServiceClient.CampaignInq(campaign);
     if (campaignInq == null)
         campaignInq = new Model.Campaign();
     if (CampaignId == 0)
         ViewBag.ViewMode = "Add";
     Session["Note"] = campaignInq.Notes;
     return View(campaignInq);
 }