public CampaignDetail CampaignDetials(int CampaignId)
 {
     try
     {
         CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
         return campaignRequestBO.CampaignDetials(CampaignId);
     }
     catch (Exception ex)
     {
         Error.WriteException(TraceEventType.Error, ex.Message.ToString(), "CampaignDetials");
         throw;
     }
 }
        /// <summary>
        /// LoadRegionTreeView() designed to format combined data 
        /// from 2 tables related to regions and super-regions into
        /// nested child nodes in json format
        /// example[{Childs=[{Childs=[{}, {}]}]}]
        /// </summary>
        /// <returns></returns>
        public JsonResult LoadRegionTreeView()
        {
            //list local variables
            CampaignRequestBO CampRequestBO = new CampaignRequestBO();
            IEnumerable<Region> AcmRegions = (IEnumerable<Region>)CampRequestBO.GetRegions();
            List<object> RegionsTopNode = new List<object>();
            string CurrentSuperRegionId = "";

            //loop through region records and create a tree structure for
            //interface tree view control.
            //represent DisplayID as combination of SuperRegionId + "$" + RegionId
            foreach (var region in AcmRegions)
            {
                if (CurrentSuperRegionId != region.SuperRegionId.Trim())
                {
                    CurrentSuperRegionId = region.SuperRegionId.Trim();
                    //select all region id's that belog to  currently selected super region id
                    IEnumerable<Region> CurrentRegions = AcmRegions.Where(x => x.SuperRegionId.Trim() == CurrentSuperRegionId);

                    //add fetched nodes to top node structure
                    RegionsTopNode.Add(new
                    {
                        displayID = region.SuperRegionId.Trim(),
                        displayText = region.SuperRegion.SuperRegionName,
                        defaultState= false,
                        Childs = (from item in CurrentRegions
                                  select new { displayID = CurrentSuperRegionId + "$" + item.RegionId, displayText = item.RegionName, defaultState = false, Childs = "" }).ToList()
                    });
                }
            }

               //create top level node to assotiate client control with data
            //fetched from database
               var TreeViewResult = new
               {
               displayID = "", displayText = "All regions", defaultState = false, Childs = RegionsTopNode
               };
               return Json(TreeViewResult, JsonRequestBehavior.AllowGet);
        }
Esempio n. 3
0
        public List <Model.CampaignTargetFileProvider> GetCampaignTargetFileProvider(int campaignId)
        {
            CampaignRequestBO campaignRequestBO = new CampaignRequestBO();

            return(campaignRequestBO.GetCampaignTargetFileProvider(campaignId));
        }
Esempio n. 4
0
 public CampaignDetail CampaignDetials(int CampaignId)
 {
     CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
        return  campaignRequestBO.CampaignDetials(CampaignId);
 }
 public List<Model.CampaignTargetFileProvider> GetCampaignTargetFileProvider(int campaignId)
 {
     try
     {
         CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
         return campaignRequestBO.GetCampaignTargetFileProvider(campaignId);
     }
     catch (Exception ex)
     {
         Error.WriteException(TraceEventType.Error, ex.Message.ToString(), "GetCampaignTargetFileProvider");
         throw;
     }
 }
        public JsonResult SaveCampaign(ACM.Model.Campaign NewCampaign, ACM.Model.CampaignTargetFileProvider[] NewCampaignTFPList, ACM.Model.CampaignLocation[] NewCampaignLocationList)
        {
            //list local variables

            CampaignRequestBO CampRequestBO = new CampaignRequestBO();
            CampRequestBO.SaveCampaign(NewCampaign, NewCampaignTFPList, NewCampaignLocationList);
            var SaveResult = new { result = "Changes Saved!" };

            return Json(SaveResult, JsonRequestBehavior.AllowGet);
        }
Esempio n. 7
0
        public CampaignDetail CampaignDetials(int CampaignId)
        {
            CampaignRequestBO campaignRequestBO = new CampaignRequestBO();

            return(campaignRequestBO.CampaignDetials(CampaignId));
        }
Esempio n. 8
0
        public void SaveCampaign(ACM.Model.Campaign campaign, ACM.Model.CampaignTargetFileProvider[] campaignTFPL, ACM.Model.CampaignLocation[] campaignLocList)
        {
            CampaignRequestBO campaignRequestBO = new CampaignRequestBO();

            campaignRequestBO.SaveCampaign(campaign, campaignTFPL, campaignLocList);
        }
Esempio n. 9
0
        public List <Model.User> GetRequestorDetails(int userId)
        {
            CampaignRequestBO campaignRequestBO = new CampaignRequestBO();

            return(campaignRequestBO.GetRequestorDetails(userId));
        }
Esempio n. 10
0
 public List<Model.CampaignLocation> GetCampaignLocation(int campaignId)
 {
     CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
     return campaignRequestBO.GetCampaignLocation(campaignId);
 }
Esempio n. 11
0
 public void CancelCampaign(int CampaignId)
 {
     CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
     campaignRequestBO.CancelCampaign(CampaignId);
 }
 public void SaveCampaign(ACM.Model.Campaign campaign, ACM.Model.CampaignTargetFileProvider[] campaignTFPL, ACM.Model.CampaignLocation[] campaignLocList)
 {
     try
     {
         CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
         campaignRequestBO.SaveCampaign(campaign, campaignTFPL, campaignLocList);
     }
     catch (Exception ex)
     {
         Error.WriteException(TraceEventType.Error, ex.Message.ToString(), "SaveCampaign");
         throw;
     }
 }
 public List<Model.User> GetRequestorDetails(int userId)
 {
     try
     {
         CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
         return campaignRequestBO.GetRequestorDetails(userId);
     }
     catch (Exception ex)
     {
         Error.WriteException(TraceEventType.Error, ex.Message.ToString(), "GetRequestorDetails");
         throw;
     }
 }
 public IEnumerable<ACM.Model.CampaignRequestor> GetRequestorDashboard(int requestorId, int lobId, string status, bool isLobRequest)
 {
     try
     {
         CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
         return campaignRequestBO.GetRequestorDashboard(requestorId, lobId, status, isLobRequest);
     }
     catch (Exception ex)
     {
         Error.WriteException(TraceEventType.Error, ex.Message.ToString(), "GetRequestorDetails");
         throw;
     }
 }
 public List<Model.Region> GetRegions()
 {
     try
     {
         CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
         return campaignRequestBO.GetRegions();
     }
     catch (Exception ex)
     {
         Error.WriteException(TraceEventType.Error, ex.Message.ToString(), "GetRegions");
         throw;
     }
 }
Esempio n. 16
0
        public List <Model.CampaignLocation> GetCampaignLocation(int campaignId)
        {
            CampaignRequestBO campaignRequestBO = new CampaignRequestBO();

            return(campaignRequestBO.GetCampaignLocation(campaignId));
        }
Esempio n. 17
0
        public List <Model.Region> GetRegions()
        {
            CampaignRequestBO campaignRequestBO = new CampaignRequestBO();

            return(campaignRequestBO.GetRegions());
        }
Esempio n. 18
0
 public List<Model.CampaignTargetFileProvider> GetCampaignTargetFileProvider(int campaignId)
 {
     CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
     return campaignRequestBO.GetCampaignTargetFileProvider(campaignId);
 }
Esempio n. 19
0
        public IEnumerable <ACM.Model.CampaignRequestor> GetRequestorDashboard(int requestorId, int lobId, string status, bool isLobRequest)
        {
            CampaignRequestBO campaignRequestBO = new CampaignRequestBO();

            return(campaignRequestBO.GetRequestorDashboard(requestorId, lobId, status, isLobRequest));
        }
Esempio n. 20
0
 public List<Model.Region> GetRegions()
 {
     CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
     return campaignRequestBO.GetRegions();
 }
Esempio n. 21
0
        public void CancelCampaign(int CampaignId)
        {
            CampaignRequestBO campaignRequestBO = new CampaignRequestBO();

            campaignRequestBO.CancelCampaign(CampaignId);
        }
Esempio n. 22
0
 public IEnumerable<ACM.Model.CampaignRequestor> GetRequestorDashboard(int requestorId, int lobId, string status, bool isLobRequest)
 {
     CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
     return campaignRequestBO.GetRequestorDashboard(requestorId, lobId, status, isLobRequest);
 }
        /// <summary>
        /// Load Users() function designed to handle AJAX call from 
        /// the application client and respond with the object in json 
        /// formatted. User initialization is done based on ad-ent id
        /// </summary>
        /// <returns></returns>
        public JsonResult LoadUser()
        {
            //define local variables
            string LoginId = User.Identity.Name;

            List<User> AcmUser = new List<User>();
            CampaignRequestBO CampRequestBO = new CampaignRequestBO();

            LoginId = LoginId.Replace("AD-ENT\\", "");
            //Request the BO logic to handle existing user
            AcmUser = CampRequestBO.GetUserDetails(LoginId);

            //perform null check before accessing data
            //if not emty list will contain 1 list member associated
            //with ad-ent login
            if (AcmUser != null)
            {
                var UserResult = new
                {
                    Id = AcmUser[0].UserId,
                    LoginId = AcmUser[0].LoginId,
                    FirstName = AcmUser[0].FirstName,
                    LastName = AcmUser[0].LastName,
                    LOBId = AcmUser[0].LOBId,
                    LOBName = AcmUser[0].LOB.LOBName
                };
                return Json(UserResult, JsonRequestBehavior.AllowGet);
            }

            //provide empty list for none existing user
            var EmptyResult = new
            {
                FirstName = "Unknown",
                LastName = "User"
            };
            return Json(EmptyResult, JsonRequestBehavior.AllowGet);
        }
Esempio n. 24
0
 public List<Model.User> GetRequestorDetails(int userId)
 {
     CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
     return campaignRequestBO.GetRequestorDetails(userId);
 }
Esempio n. 25
0
 public void SaveCampaign(ACM.Model.Campaign campaign, ACM.Model.CampaignTargetFileProvider[] campaignTFPL, ACM.Model.CampaignLocation[] campaignLocList)
 {
     CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
      campaignRequestBO.SaveCampaign(campaign,  campaignTFPL,  campaignLocList);
 }
 public void CancelCampaign(int CampaignId)
 {
     try
     {
         CampaignRequestBO campaignRequestBO = new CampaignRequestBO();
         campaignRequestBO.CancelCampaign(CampaignId);
     }
     catch (Exception ex)
     {
         Error.WriteException(TraceEventType.Error, ex.Message.ToString(), "CancelCampaign");
         throw;
     }
 }