public void TerminateSeed(string id) { bool isCompleted = false; SeedAction objSeed = new SeedAction(); isCompleted = objSeed.HarvestTerminateSeed(id, "Terminate"); if (isCompleted == true) Response.Redirect("/Admin/ManageSeeds"); }
public string TerminateMySeed(string id) { #region bool isCompleted = false; string msg = "false"; SeedAction objSeed = new SeedAction(); isCompleted = objSeed.HarvestTerminateSeed(id, "Terminate"); if (isCompleted == true) msg = "true"; JavaScriptSerializer serializer = new JavaScriptSerializer(); var output = serializer.Serialize(msg); return output; #endregion }
/// <summary> /// Method to Terminate or Harvest Seeds. /// </summary> /// <param name="seedid"></param> /// <param name="Action"></param> /// <returns></returns> public string HarvestTerminateSeed(string seedId, string Action) { #region string isCompleted = "Error in Update Action"; SeedAction objSeed = new SeedAction(); try { bool Result = objSeed.HarvestTerminateSeed(seedId, Action); if (Result) isCompleted = "Action completed Sucessfully"; } catch { } return isCompleted; #endregion }
public void HarvestSeed(string id) { #region bool isCompleted = false; SeedAction objSeed = new SeedAction(); Seed seed = GetSeedInformation(id); isCompleted = objSeed.HarvestTerminateSeed(id, "Harvest"); if (isCompleted == true) { //send automated email to inform the administrator that a new flag has been posted on a seed // Creating array list for token ArrayList arrTokens = new ArrayList(); arrTokens.Add(seed.Member.firstName + " " + seed.Member.lastName); arrTokens.Add(seed.title); // Filling mail object SendMail objSendMail = new SendMail(); objSendMail.ToEmailId = seed.Member.username; objSendMail.Subject = "email.harvestSeed.subject.content"; objSendMail.MsgBody = "email.harvestSeed.body.content"; objSendMail.ChangesInMessage = arrTokens; objSendMail.SendEmail(objSendMail);// Response.Redirect("/Seed/ManageSeeds"); } #endregion }