public ActionResult Confirmation(Int64 Id)
        {
            StaffRegistrationInfo staff = null;

            if (Id != 0)
            {
                staff = familyServices.GetStaffDetailByYakkrId(Id);
            }
            return(View(staff));
        }
        public ActionResult SendEmailForFSW(FamilyDetails family)
        {
            Int64 Id = 0;
            StaffRegistrationInfo staff = new StaffRegistrationInfo();
            bool isSent = false;

            try
            {
                Guid RoleId = new Guid("94CDF8A2-8D81-4B80-A2C6-CDBDC5894B6D");
                List <StaffRegistrationInfo> staffInfo = familyServices.GetEmailByCenterId(family.CenterId, AgencyId, RoleId);
                if (staffInfo.Count() > 0)
                {
                    int  index   = 0;
                    Guid staffId = familyServices.GetLastStaffId(family.CenterId);
                    if (staffInfo.Count > 1 && staffId != Guid.Empty)
                    {
                        index = staffInfo.FindIndex(a => a.Id == staffId);
                        if (index < staffInfo.Count - 1 && index != -1)
                        {
                            index = index + 1;
                        }
                        else
                        {
                            index = 0;
                        }
                    }
                    staff = staffInfo.ElementAt(index);
                    //TempData["ConfirmationDetail"] = staff;
                    string MailContent = GetMailContent(family);
                    isSent = Common.SendMessage(staff.EmailAddress, "Educational Center", MailContent);
                    if (isSent)
                    {
                        YakkrRoutingLEAD yakkr = new YakkrRoutingLEAD();
                        yakkr.Agencyid = AgencyId;
                        yakkr.StaffID  = staff.UserId;
                        yakkr.CenterID = family.CenterId;
                        yakkr.ParentId = family.ParentId;
                        Id             = yakkrService.Insert(yakkr);
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Log(ex.Message.ToString(), "Family", "SendEmailForFSW");
            }
            return(Json(Id));
        }