Beispiel #1
0
        public ActionResult LoadMasterCampaign(ChildCampaignViewModel model)
        {
            model.Industries_Id    = null;
            model.BusinessLines_Id = null;

            if (model.MasterCampaignId != 0)
            {
                List <MasterCampaign> masterChild =
                    _masterCampaignServices.GetMasterCampaignById(model.MasterCampaignId);
                foreach (var item in masterChild)
                {
                    // model.IndustryViewModels = item.Industries.ToList();
                    if (model.CampaignTypes == 0)
                    {
                        model.BusinessGroupViewModels = model.BusinessGroupViewModels.Concat(item.BusinessGroups).ToList();
                        model.SegmentViewModels       = item.Segments.ToList();
                    }
                    else
                    {
                        model.BusinessGroupViewModels = item.BusinessGroups.ToList();
                        model.SegmentViewModels       = model.SegmentViewModels.Concat(item.Segments).ToList();
                    }

                    //if (model.Segments_Id != null)
                    //{
                    //    if (model.Segments_Id[0] != 0 && model.Segments_Id[0] != -1)
                    //        model.IndustryViewModels = item.Industries.ToList();
                    //}
                    //else {
                    //    model.Industries_Id = null;
                    //}
                    //if (model.BusinessGroups_Id != null)
                    //{
                    //    if (model.BusinessGroups_Id[0] != 0 && model.BusinessGroups_Id[0] != -1)
                    //        model.BusinessLineViewModels = item.BusinessLines.ToList();
                    //}
                    //else {
                    //    model.BusinessLines_Id = null;
                    //}

                    model.ThemeViewModels     = item.Themes.ToList();
                    model.GeographyViewModels = item.Geographys.ToList();
                    model.MCStartDate         = item.StartDate;
                    model.MCEndDate           = item.EndDate;
                }
            }
            else if (model.MasterCampaignId == 0)
            {
                ModelState.Clear();
                ChildCampaignViewModel modelCCVM = new ChildCampaignViewModel();
                modelCCVM.MasterViewModels = _masterCampaignServices.GetOrderedMasterCampaign().Where(t => t.Status == "Complete").ToList();
                return(PartialView("ChildCampaignForm", modelCCVM));
            }

            ManageSelectUnselect(model);

            model.MasterViewModels = _masterCampaignServices.GetOrderedMasterCampaign().Where(t => t.Status == Status.Complete.ToString()).ToList();

            return(PartialView("ChildCampaignForm", model));
        }
Beispiel #2
0
        public ActionResult LoadBusinessLine(ChildCampaignViewModel model)
        {
            if (model.MasterCampaignId != 0)
            {
                List <MasterCampaign> masterChild =
                    _masterCampaignServices.GetMasterCampaignById(model.MasterCampaignId);

                foreach (var item in masterChild)
                {
                    if (model.CampaignTypes == 0)
                    {
                        model.BusinessGroupViewModels = model.BusinessGroupViewModels.Concat(item.BusinessGroups).ToList();
                        model.SegmentViewModels       = item.Segments.ToList();
                    }
                    else
                    {
                        model.BusinessGroupViewModels = item.BusinessGroups.ToList();
                        model.SegmentViewModels       = model.SegmentViewModels.Concat(item.Segments).ToList();
                    }
                    model.GeographyViewModels = item.Geographys.ToList();
                    model.ThemeViewModels     = item.Themes.ToList();
                    if (model.Segments_Id != null)
                    {
                        if (model.Segments_Id[0] != 0 && model.Segments_Id[0] != -1)
                        {
                            model.IndustryViewModels = item.Industries.ToList();
                        }

                        //List<Industry> lst = _industryService.GetIndustryBySegmentId(model.Segments_Id);
                        //model.IndustryViewModels = lst;
                    }
                    else
                    {
                        model.Industries_Id = null;
                    }
                    if (model.BusinessGroups_Id != null)
                    {
                        if (model.BusinessGroups_Id[0] != 0 && model.BusinessGroups_Id[0] != -1)
                        {
                            model.BusinessLineViewModels = model.BusinessLineViewModels.Concat(item.BusinessLines).ToList();
                        }
                        //  model.BusinessLineViewModels = item.BusinessLines.ToList();

                        //List<BusinessLine> businesslist = _businesslineService.GetBusinessLineByBGId(model.BusinessGroups_Id);
                        //model.BusinessLineViewModels = businesslist;
                    }
                    else
                    {
                        model.BusinessLines_Id = null;
                    }
                    model.MCStartDate = item.StartDate;
                    model.MCEndDate   = item.EndDate;
                }
            }

            ManageSelectUnselect(model);
            model.MasterViewModels = _masterCampaignServices.GetOrderedMasterCampaign().Where(t => t.Status == Status.Complete.ToString()).ToList();

            return(PartialView("ChildCampaignForm", model));
        }
Beispiel #3
0
        public bool InsertChildCampaign(ChildCampaignViewModel model)
        {
            var childCampaignEntity = new ChildCampaign();

            ModelToEntity(model, childCampaignEntity);
            childCampaignEntity.SubCampaignBudgetingDetails = model.SubCampaignBudgetingDetailViewModels;
            guow.GenericRepository <ChildCampaign>().Insert(childCampaignEntity);
            UpdateMasterStatus(model.MasterCampaignId);
            return(childCampaignEntity.Id != 0);
        }
Beispiel #4
0
        //Manage SelectUnselect
        public ChildCampaignViewModel ManageSelectUnselect(ChildCampaignViewModel model)
        {
            if ((model.BusinessGroups_Id != null && (model.BusinessGroupViewModels.ToList().Count > model.BusinessGroups_Id.Length)) || model.BusinessGroups_Id == null)
            {
                model.BgSelectUnselect = false;
            }
            else
            {
                model.BgSelectUnselect = true;
            }
            if ((model.BusinessLines_Id != null && (model.BusinessLineViewModels.ToList().Count > model.BusinessLines_Id.Length)) || model.BusinessLines_Id == null)
            {
                model.BlSelectUnselect = false;
            }
            else
            {
                model.BlSelectUnselect = true;
            }
            if ((model.Segments_Id != null && (model.SegmentViewModels.ToList().Count > model.Segments_Id.Length)) || model.Segments_Id == null)
            {
                model.SegSelectUnselect = false;
            }
            else
            {
                model.SegSelectUnselect = true;
            }
            if ((model.Industries_Id != null && (model.IndustryViewModels.ToList().Count > model.Industries_Id.Length)) || model.Industries_Id == null)
            {
                model.IndustrySelectUnselect = false;
            }
            else
            {
                model.IndustrySelectUnselect = true;
            }
            if ((model.Themes_Id != null && (model.ThemeViewModels.ToList().Count > model.Themes_Id.Length)) || model.Themes_Id == null)
            {
                model.ThemeSelectUnselect = false;
            }
            else
            {
                model.ThemeSelectUnselect = true;
            }
            if ((model.Geographys_Id != null && (model.GeographyViewModels.ToList().Count > model.Geographys_Id.Length)) || model.Geographys_Id == null)
            {
                model.GeoSelectUnselect = false;
            }
            else
            {
                model.GeoSelectUnselect = true;
            }

            return(model);
        }
Beispiel #5
0
        public void Update(ChildCampaignViewModel model)
        {
            var childCamp = LoadChilCampaignEntity(model.Id);

            if (childCamp.Status != Status.Complete.ToString())
            {
                childCamp = FlushChildRecords(childCamp);
            }
            ModelToEntity(model, childCamp);
            childCamp.SubCampaignBudgetingDetails = model.SubCampaignBudgetingDetailViewModels;
            foreach (var item in childCamp.SubCampaignBudgetingDetails)
            {
                item.ChildCampaign = childCamp;
            }
            guow.GenericRepository <ChildCampaign>().Update(childCamp);
        }
Beispiel #6
0
        public bool Save(ChildCampaignViewModel model, string button, string budgetModel)
        {
            model.MasterViewModels = _masterCampaignServices.GetOrderedMasterCampaign().Where(t => t.Status == Status.Complete.ToString()).ToList();
            // Deserializing json model to object
            List <SubCampaignBudgetingDetail> viewModel = new JavaScriptSerializer().Deserialize <List <SubCampaignBudgetingDetail> >(budgetModel);

            model.SubCampaignBudgetingDetailViewModels = viewModel;
            try
            {
                //todo:
                if (button == "Save Draft")
                {
                    if (model.Id == 0)// insert new record as draft
                    {
                        model.Status = Status.Draft.ToString();
                        _childCampaignServices.InsertChildCampaign(model);
                        return(true);
                    }
                    model.Status = Status.Draft.ToString();
                    _childCampaignServices.Update(model);
                    return(true);
                }
                if (isValid(model))
                {
                    if (model.Id == 0)
                    {
                        model.Status = Status.Complete.ToString();
                        _childCampaignServices.InsertChildCampaign(model);
                        return(true);
                    }
                    else
                    {
                        model.Status = Status.Complete.ToString();
                        _childCampaignServices.Update(model);
                        return(true);
                    }
                }

                return(false);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
Beispiel #7
0
        public ActionResult OnChangeCampaignTypes(ChildCampaignViewModel model)
        {
            List <MasterCampaign> masterChild = _masterCampaignServices.GetMasterCampaignById(model.MasterCampaignId);

            model.BusinessGroups_Id = null;
            model.BusinessLines_Id  = null;
            model.Industries_Id     = null;
            model.Segments_Id       = null;

            foreach (var item in masterChild)
            {
                // model.IndustryViewModels = item.Industries.ToList();
                if (model.CampaignTypes == 0)
                {
                    model.BusinessGroupViewModels = model.BusinessGroupViewModels.Concat(item.BusinessGroups).ToList();
                    model.SegmentViewModels       = item.Segments.ToList();
                }
                else
                {
                    model.BusinessGroups_Id       = null;
                    model.BusinessLines_Id        = null;
                    model.BusinessGroupViewModels = item.BusinessGroups.ToList();
                    model.SegmentViewModels       = model.SegmentViewModels.Concat(item.Segments).ToList();
                }
                model.ThemeViewModels     = item.Themes.ToList();
                model.GeographyViewModels = item.Geographys.ToList();


                model.MCStartDate = item.StartDate;
                model.MCEndDate   = item.EndDate;
            }


            ManageSelectUnselect(model);
            model.MasterViewModels = _masterCampaignServices.GetOrderedMasterCampaign().Where(t => t.Status == Status.Complete.ToString()).ToList();
            return(PartialView("ChildCampaignForm", model));
        }
Beispiel #8
0
        private void ModelToEntity(ChildCampaignViewModel model, ChildCampaign childCampaignEntity)
        {
            childCampaignEntity.InheritStatus = model.Status == Status.Draft.ToString() ? InheritStatus.Draft.ToString() : InheritStatus.Active.ToString();
            if (childCampaignEntity.Status == Status.Complete.ToString() && model.Id != 0)
            {
                childCampaignEntity.StartDate           = model.StartDate;
                childCampaignEntity.EndDate             = model.EndDate;
                childCampaignEntity.Budget              = model.Budget;
                childCampaignEntity.Spend               = model.Spend;
                childCampaignEntity.CampaignDescription = model.CampaignDescription;
            }
            else
            {
                childCampaignEntity.MasterCampaigns = guow.GenericRepository <MasterCampaign>()
                                                      .GetByID(model.MasterCampaignId);
                childCampaignEntity.Name = model.Name;
                childCampaignEntity.CampaignDescription = model.CampaignDescription;
                childCampaignEntity.CampaignManager     = model.CampaignManager;
                childCampaignEntity.StartDate           = model.StartDate;
                childCampaignEntity.EndDate             = model.EndDate;
                childCampaignEntity.Status       = model.Status;
                childCampaignEntity.CreatedBy    = "user";
                childCampaignEntity.Budget       = model.Budget;
                childCampaignEntity.Spend        = model.Spend;
                childCampaignEntity.MILGoal      = model.MILGoal;
                childCampaignEntity.MILLow       = model.MILLow;
                childCampaignEntity.MILHigh      = model.MILHigh;
                childCampaignEntity.MGLGoal      = model.MGLGoal;
                childCampaignEntity.MGLLow       = model.MGLLow;
                childCampaignEntity.MGLHigh      = model.MGLHigh;
                childCampaignEntity.MIOGoal      = model.MIOGoal;
                childCampaignEntity.MIOLow       = model.MIOLow;
                childCampaignEntity.MIOHigh      = model.MIOHigh;
                childCampaignEntity.MGOGoal      = model.MGOGoal;
                childCampaignEntity.MGOLow       = model.MGOLow;
                childCampaignEntity.MGOHigh      = model.MGOHigh;
                childCampaignEntity.MILSource    = model.MILSource;
                childCampaignEntity.MGLSource    = model.MGLSource;
                childCampaignEntity.MIOSource    = model.MIOSource;
                childCampaignEntity.MGOSource    = model.MGOSource;
                childCampaignEntity.CampaignType = (model.CampaignTypes == CampaignType.BG_Led ? 0 : 1);


                List <BusinessLine>  lstBline  = null;
                List <BusinessGroup> lstBGroup = null;
                if (model.BusinessGroups_Id != null)
                {
                    lstBGroup = new List <BusinessGroup>();
                    foreach (var item in model.BusinessGroups_Id)
                    {
                        var Bgroups = guow.GenericRepository <BusinessGroup>().GetByID(item);
                        lstBGroup.Add(Bgroups);
                    }
                    lstBline = new List <BusinessLine>();

                    if (model.BusinessLines_Id != null)
                    {
                        foreach (var item in model.BusinessLines_Id)
                        {
                            var Bline = guow.GenericRepository <BusinessLine>().GetByID(item);
                            lstBline.Add(Bline);
                        }
                    }
                }


                List <Theme> lsttheme = null;
                if (model.Themes_Id != null)
                {
                    lsttheme = new List <Theme>();
                    foreach (var item in model.Themes_Id)
                    {
                        var theme = guow.GenericRepository <Theme>().GetByID(item);
                        lsttheme.Add(theme);
                    }
                }

                List <Industry> lstindustry = null;
                List <Segment>  lstsegment  = null;

                if (model.Segments_Id != null)
                {
                    lstsegment = new List <Segment>();
                    foreach (var item in model.Segments_Id)
                    {
                        var segment = guow.GenericRepository <Segment>().GetByID(item);
                        lstsegment.Add(segment);
                    }
                    lstindustry = new List <Industry>();


                    if (model.Industries_Id != null)
                    {
                        foreach (var item in model.Industries_Id)
                        {
                            var industry = guow.GenericRepository <Industry>().GetByID(item);
                            lstindustry.Add(industry);
                        }
                    }
                }

                List <Geography> lstgeography = null;
                if (model.Geographys_Id != null)
                {
                    lstgeography = new List <Geography>();
                    foreach (var item in model.Geographys_Id)
                    {
                        var geography = guow.GenericRepository <Geography>().GetByID(item);
                        lstgeography.Add(geography);
                    }
                }


                childCampaignEntity.BusinessGroups = lstBGroup;
                childCampaignEntity.Themes         = lsttheme;
                childCampaignEntity.BusinessLines  = lstBline;
                childCampaignEntity.Segments       = lstsegment;
                childCampaignEntity.Industries     = lstindustry;
                childCampaignEntity.Geographys     = lstgeography;
                if (model.Id == 0)
                {
                    childCampaignEntity.VisitedDate = DateTime.Now;
                }
            }
        }
Beispiel #9
0
        public List <ChildCampaign> GetChildCampaignById(ChildCampaignViewModel model)
        {
            List <ChildCampaign> childCampaign = guow.GenericRepository <ChildCampaign>().GetAllIncluding((t => t.Geographys), (m => m.Industries), (m => m.BusinessGroups), (m => m.BusinessLines), (m => m.Segments), (m => m.Themes)).Where(t => t.Id == model.Id).ToList();

            return(childCampaign);
        }
Beispiel #10
0
        public ActionResult ChildCampaignList()
        {
            ChildCampaignViewModel childCampaignViewModel = new ChildCampaignViewModel();

            return(View(childCampaignViewModel));
        }
Beispiel #11
0
        private bool isValid(ChildCampaignViewModel model)
        {
            int errorCounter = 0;

            if (model.Id != 0)
            {
                if (Convert.ToDateTime(model.StartDate) > Convert.ToDateTime(model.EndDate))
                {
                    errorCounter++;
                }
                if (model.CampaignDescription == "")
                {
                    errorCounter++;
                }
                if (model.StartDate == null)
                {
                    errorCounter++;
                }
                if (model.EndDate == null)
                {
                    errorCounter++;
                }
                if (model.StartDate != null && model.EndDate != null)
                {
                    if (model.StartDate != null && model.EndDate != null)
                    {
                        if (model.StartDate < model.MCStartDate || model.EndDate > model.MCEndDate)
                        {
                            errorCounter++;
                        }
                    }
                }
            }
            else
            {
                if (model.MasterCampaignId == 0)
                {
                    errorCounter++;
                }
                if (model.BusinessGroups_Id == null)
                {
                    errorCounter++;
                }
                if (model.BusinessLines_Id == null)
                {
                    errorCounter++;
                }
                if (model.Segments_Id == null)
                {
                    errorCounter++;
                }
                if (model.StartDate == null)
                {
                    errorCounter++;
                }
                if (model.EndDate == null)
                {
                    errorCounter++;
                }
                //if (model.CampaignTypes == CampaignType.GEPS && model.Segments_Id == null) errorCounter++;
                if (Convert.ToDateTime(model.StartDate) > Convert.ToDateTime(model.EndDate))
                {
                    errorCounter++;
                }
                if (model.Name == "")
                {
                    errorCounter++;
                }
                if (model.CampaignDescription == "")
                {
                    errorCounter++;
                }
                if (model.Budget == 0)
                {
                    errorCounter++;
                }
                if (model.CampaignTypes == CampaignType.BG_Led)
                {
                    var bgArr = model.BusinessGroups_Id;
                    if (bgArr != null && bgArr.Length != 1)
                    {
                        errorCounter++;
                    }
                }
                else
                {
                    var segArr = model.Segments_Id;
                    if (segArr != null && segArr.Length != 1)
                    {
                        errorCounter++;
                    }
                }
                if (model.CampaignTypes == CampaignType.GEPS)
                {
                    if (model.Industries_Id == null)
                    {
                        errorCounter++;
                    }
                }

                if (model.StartDate != null && model.EndDate != null)
                {
                    if (model.StartDate != null && model.EndDate != null)
                    {
                        if (model.StartDate < model.MCStartDate || model.EndDate > model.MCEndDate)
                        {
                            errorCounter++;
                        }
                    }
                }
            }

            return(errorCounter == 0);
        }
Beispiel #12
0
        public ActionResult ChildCampaign(int Id = 0)
        {
            ChildCampaignViewModel Childvm = new ChildCampaignViewModel();

            Childvm.MasterViewModels = _masterCampaignServices.GetOrderedMasterCampaign().Where(t => t.Status == Status.Complete.ToString()).ToList();

            if (Id != 0)
            {
                ChildCampaign childCampaign = _childCampaignServices.GetChildCampaignById(new ChildCampaignViewModel {
                    Id = Id
                }).First();

                Childvm.SubCampaignBudgetingDetailViewModels = _childCampaignServices.GetSubCampaignBudgetingDetails(Id).ToList();

                //List<TacticCampaign> tacticList = _tacticCampaignServices.GetTacticCampaignByChildId(Id).ToList();
                //var Inheritanceflag=0;
                //foreach (var itemtacticList in tacticList)
                //{
                //   if (itemtacticList.Status != Status.Complete.ToString() && (itemtacticList.EndDate>DateTime.Now))
                //        Inheritanceflag = 1;
                //}
                //if (tacticList.Count == 0)
                //{
                //    Childvm.InheritanceStatus = childCampaign.InheritStatus;
                //}
                //else if (Inheritanceflag== 0) { Childvm.InheritanceStatus = InheritStatus.Complete.ToString(); }
                //else { Childvm.InheritanceStatus = InheritStatus.Active.ToString(); }

                if (childCampaign.MasterCampaigns.Id != 0)
                {
                    List <MasterCampaign> masterChild =
                        _masterCampaignServices.GetMasterCampaignById(childCampaign.MasterCampaigns.Id);
                    foreach (var item in masterChild)
                    {
                        if (Childvm.CampaignTypes == 0)
                        {
                            Childvm.BusinessGroupViewModels = Childvm.BusinessGroupViewModels.Concat(item.BusinessGroups).ToList();
                            Childvm.SegmentViewModels       = item.Segments.ToList();
                        }
                        else
                        {
                            Childvm.BusinessGroupViewModels = item.BusinessGroups.ToList();
                            Childvm.SegmentViewModels       = Childvm.SegmentViewModels.Concat(item.Segments).ToList();
                        }

                        Childvm.GeographyViewModels = item.Geographys.ToList();
                        Childvm.ThemeViewModels     = item.Themes.ToList();

                        Childvm.BusinessLineViewModels = item.BusinessLines.ToList();
                        Childvm.IndustryViewModels     = item.Industries.ToList();
                        Childvm.MCStartDate            = item.StartDate;
                        Childvm.MCEndDate = item.EndDate;
                    }
                }

                if (childCampaign.MasterCampaigns != null && childCampaign.MasterCampaigns.Id != 0)
                {
                    Childvm.MasterCampaignId = childCampaign.MasterCampaigns.Id;
                }

                if (childCampaign.Themes != null && childCampaign.Themes.Count > 0)
                {
                    Childvm.Themes_Id = childCampaign.Themes.Select(t => t.Id).ToArray();;
                }


                if (childCampaign.BusinessGroups != null && childCampaign.BusinessGroups.Count > 0)
                {
                    Childvm.BusinessGroups_Id = childCampaign.BusinessGroups.Select(t => t.Id).ToArray();;
                }


                if (childCampaign.BusinessLines != null && childCampaign.BusinessLines.Count > 0)
                {
                    Childvm.BusinessLines_Id = childCampaign.BusinessLines.Select(t => t.Id).ToArray();;
                }


                if (childCampaign.Segments != null && childCampaign.Segments.Count > 0)
                {
                    Childvm.Segments_Id = childCampaign.Segments.Select(t => t.Id).ToArray();;
                }

                if (childCampaign.Geographys != null && childCampaign.Geographys.Count > 0)
                {
                    Childvm.Geographys_Id = childCampaign.Geographys.Select(t => t.Id).ToArray();;
                }


                if (childCampaign.Industries != null && childCampaign.Industries.Count > 0)
                {
                    Childvm.Industries_Id = childCampaign.Industries.Select(t => t.Id).ToArray();;
                }

                Childvm.Name = childCampaign.Name;
                Childvm.CampaignDescription = childCampaign.CampaignDescription;
                Childvm.CampaignManager     = childCampaign.CampaignManager;

                Childvm.Budget    = childCampaign.Budget;
                Childvm.StartDate = childCampaign.StartDate;
                Childvm.EndDate   = childCampaign.EndDate;

                Childvm.Spend     = childCampaign.Spend;
                Childvm.Id        = childCampaign.Id;
                Childvm.Status    = childCampaign.Status;
                Childvm.MILGoal   = childCampaign.MILGoal;
                Childvm.MILLow    = childCampaign.MILLow;
                Childvm.MILHigh   = childCampaign.MILHigh;
                Childvm.MGLGoal   = childCampaign.MGLGoal;
                Childvm.MGLLow    = childCampaign.MGLLow;
                Childvm.MGLHigh   = childCampaign.MGLHigh;
                Childvm.MIOGoal   = childCampaign.MIOGoal;
                Childvm.MIOLow    = childCampaign.MIOLow;
                Childvm.MIOHigh   = childCampaign.MIOHigh;
                Childvm.MGOGoal   = childCampaign.MGOGoal;
                Childvm.MGOLow    = childCampaign.MGOLow;
                Childvm.MGOHigh   = childCampaign.MGOHigh;
                Childvm.MILSource = childCampaign.MILSource;
                Childvm.MGLSource = childCampaign.MGLSource;
                Childvm.MIOSource = childCampaign.MIOSource;
                Childvm.MGOSource = childCampaign.MGOSource;

                Childvm.CampaignTypes  = (childCampaign.CampaignType == 0 ? CampaignType.BG_Led : CampaignType.GEPS);
                Childvm.BusinessLineId = childCampaign.BusinessLineId;

                var MasterCampaignName = string.Empty;
                foreach (var val in Childvm.MasterViewModels)
                {
                    if (val.Id == childCampaign.MasterCampaigns.Id)
                    {
                        MasterCampaignName = val.Name;
                    }
                }

                Childvm.InheritanceStatus     = childCampaign.InheritStatus;
                Childvm.StatusInheritaceStamp = String.Format("{0:yy}", childCampaign.UpdatedDate) + "." + MasterCampaignName + "." + Childvm.Name + " //"
                                                + (Childvm.Status == Status.Draft.ToString()?Status.Draft.ToString():Childvm.InheritanceStatus) +
                                                " // " + String.Format("{0:ddMMyy HH:MM}", childCampaign.UpdatedDate);

                ManageSelectUnselect(Childvm);

                //Update visited date
                if (Childvm.Status == Status.Draft.ToString())
                {
                    childCampaign.VisitedDate = DateTime.Now;
                    _childCampaignServices.Update(childCampaign);
                }
            }

            return(View(Childvm));
        }