Exemple #1
0
        public static string FncSendReminderMailToClient(string emailAddress, string AdminEmailIds, long stratasBoardId, string message)
        {
            try
            {
                StrataBoardHelper strataBoardHelper = new StrataBoardHelper();
                StrataBoardModel  strataBoardModel  = new StrataBoardModel();
                strataBoardModel = strataBoardHelper.GetStratasBoardByID(stratasBoardId);


                //string url = ConfigurationManager.AppSettings["WebsiteRootPath"].ToString();
                //EmailSender objClsMail = GetCommonDataForSendMail(emailAddress, "Reminder from StratasFair");
                //StringBuilder mailBody = new StringBuilder();
                //mailBody.Append(getConfigValue("stratasboard-reminder-mail").Replace("{NAME}", strataBoardModel.StratasBoardName));
                //mailBody.Replace("{BASEPATH}", url);
                //mailBody.Replace("{MESSAGE}", message);
                //objClsMail.Body = mailBody.ToString();
                //objClsMail.Bcc = AdminEmailIds;

                //for attachment

                //objClsMail.AttachmentList = new ArrayList(1);
                //objClsMail.AttachmentList.Add(System.Web.HttpContext.Current.Server.MapPath(objOrder.InvoiceFilePath));

                //objClsMail = FncSendMail(objClsMail);
                //return objClsMail.ErrorMessage;
                return("success");
            }
            catch
            {
                return("");
            }
        }
Exemple #2
0
        public ActionResult Edit(long?Id)
        {
            StrataBoardHelper strataBoardHelper = new StrataBoardHelper();
            StrataBoardModel  strataBoardModel  = new StrataBoardModel();

            strataBoardModel = strataBoardHelper.GetStratasBoardByID(Id.Value);

            ViewBag.StatusList = AppLogic.BindDDStatus(Convert.ToInt32(strataBoardModel.Status));
            return(View(strataBoardModel));
        }
Exemple #3
0
        public ActionResult Deactive(long Id)
        {
            StrataBoardHelper strataBoardHelper = new StrataBoardHelper();
            StrataBoardModel  strataBoardModel  = new StrataBoardModel();

            strataBoardModel        = strataBoardHelper.GetStratasBoardByID(Id);
            strataBoardModel.Status = 0;
            int count = strataBoardHelper.ActDeact(strataBoardModel);

            if (count == 0)
            {
                TempData["CommonMessage"] = AppLogic.setMessage(count, "Record deactivated successfully.");
            }
            else
            {
                TempData["CommonMessage"] = AppLogic.setMessage(count, "Record deactivation failed.");
            }
            return(RedirectToAction("Index"));
        }
Exemple #4
0
        public ActionResult Delete(long Id)
        {
            StrataBoardHelper strataBoardHelper = new StrataBoardHelper();
            StrataBoardModel  strataBoardModel  = new StrataBoardModel();

            strataBoardModel = strataBoardHelper.GetStratasBoardByID(Id);

            int count = strataBoardHelper.Delete(strataBoardModel);

            if (count == 0)
            {
                TempData["CommonMessage"] = AppLogic.setMessage(count, "Record deleted successfully.");
            }
            else if (count == -2)
            {
                TempData["CommonMessage"] = AppLogic.setMessage(count, "Record can't be deleted as other users exists.");
            }
            else
            {
                TempData["CommonMessage"] = AppLogic.setMessage(count, "Record deletion failed.");
            }
            return(RedirectToAction("Index"));
        }
 public ActionResult Index()
 {
     if (ClientSessionData.UserClientId != 0)
     {
         StrataBoardModel strataBoardModel = new StrataBoardModel();
         strataBoardModel = strataBoardHelper.GetStratasBoardByID(ClientSessionData.ClientStrataBoardId);
         if (ClientSessionData.ClientRoleName.ToLower() == "owner")
         {
             if (!ClientSessionData.ClientIsProfileCompleted)
             {
                 return(Redirect(Url.Content("~/" + strataBoardModel.PortalLink + "/logon/completeprofile")));
             }
             else
             {
                 return(Redirect(Url.Content("~/" + strataBoardModel.PortalLink + "/dashboard/dashboardowner")));
             }
         }
         else
         {
             return(Redirect(Url.Content("~/" + strataBoardModel.PortalLink + "/dashboard")));
         }
     }
     else
     {
         string PortalUrl        = clientLoginHelper.GetPortalUrlFromCurrentUrl();
         var    IsExistPortalUrl = _context.tblStratasBoards.Where(x => x.PortalLink == PortalUrl && x.Status == 0);
         if (IsExistPortalUrl.Count() > 0)
         {
             return(Redirect(Url.Content("~/" + PortalUrl + "/logon/invalidportallink")));
         }
         else
         {
             return(View());
         }
     }
 }