public JsonResult GetIdeaById(string ID) { IdeaManager ideaMng = IdeaManager.GetInstance(); var idea = ideaMng.GetIdea(ID); return(Json(idea)); }
public MainWindow() { InitializeComponent(); this.Title = "BrainStormer"; // create Idea and User manager objects IdeaManager anIdeaManager = new IdeaManager(); UserManager aUserManager = new UserManager(); // create FileReader object FileManager aFileReader = new FileManager(); // read data from local files into the managers aFileReader.GetData(anIdeaManager); aFileReader.GetData(aUserManager); // initializes the idea tournament page anIdeaTournamentPage = new IdeaTournamentPage(anIdeaManager, aUserManager); anIdeaListPage = new IdeaListPage(anIdeaManager, aUserManager); aMindMapPage.SetItemSource(anIdeaManager.Ideas); currentPage = "loginpage"; // navigates to the page to be displayed on startup _mainFrame.Navigate(aLoginPage); }
public AddItem(IdeaManager ideaManager, User user, IdeaListPage.buttonType type, ListBox ideaList, ListBox commentList, ListBox proConList) { InitializeComponent(); IdeaManager = ideaManager; User = user; IdeaListBox = ideaList; CommentListBox = commentList; Type = type; switch (Type) { case IdeaListPage.buttonType.Idea: IdeaDescription.Visibility = Visibility.Visible; IdeaDescriptionLabel.Visibility = Visibility.Visible; IdeaName.Visibility = Visibility.Visible; IdeaNameLabel.Visibility = Visibility.Visible; break; case IdeaListPage.buttonType.Comment: CommentDescription.Visibility = Visibility.Visible; CommentDescriptionLabel.Visibility = Visibility.Visible; break; case IdeaListPage.buttonType.ProCon: ProConDescription.Visibility = Visibility.Visible; ProConDescriptionLabel.Visibility = Visibility.Visible; ProConName.Visibility = Visibility.Visible; ProConNameLabel.Visibility = Visibility.Visible; Pro.Visibility = Visibility.Visible; Con.Visibility = Visibility.Visible; break; } }
public JsonResult GetIdea(DataTableParameters dataTableParameters, string div, string dep) { IdeaManager idea = IdeaManager.GetInstance(); var resultSet = new DataTableResultSet(); resultSet.draw = dataTableParameters.Draw; var lst = idea.SelectPaging(dataTableParameters.Start + 1, dataTableParameters.Start + dataTableParameters.Length + 1, div, dep); resultSet.recordsTotal = resultSet.recordsFiltered = idea.GetCount(div, dep); foreach (var i in lst) { var columns = new List <string>(); columns.Add(i.ROWNUM.ToString()); columns.Add((i.DIVISION == null) ? "" : i.DIVISION.Trim()); columns.Add((i.DEPARTMENT == null) ? "" : i.DEPARTMENT.Trim()); columns.Add((i.EMP_NAME == null) ? "" : i.EMP_NAME.Trim()); columns.Add("<a class='title' href='#' id='" + i.ID + "' data-emp='" + i.EMP_ID.Trim() + "'>" + i.IDEA_TITLE.Trim() + "</a>"); columns.Add((i.DATE == null) ? "" : i.DATE.ToShortDateString()); columns.Add("<a href='#' class='rep' title='Reply' data-id='" + i.ID + "' data-trigger='focus'><span class='badge badge-pill badge-primary'>" + i.REP.ToString() + "</span></a>"); columns.Add("<a href='#' class='like' title='Like' data-id='" + i.ID + "' data-table='1' data-trigger='focus'><span class='badge badge-pill badge-primary'>" + i.L.ToString() + "</span></a>"); resultSet.data.Add(columns); } return(Json(resultSet)); }
public List <Judge> GetJugdeList() { Judge judge = new Judge(); IdeaManager manager = new IdeaManager(); return(manager.GetData()); }
public IdeaListPage(IdeaManager anIdeaManager, UserManager aUserManager) { InitializeComponent(); IdeaManager = anIdeaManager; UserManager = aUserManager; CurrentButtonType = buttonType.Idea; IdeaViewerBox.ItemsSource = IdeaManager.Ideas; }
public JsonResult RegPrj(PROJECT Project, List <PROJECT_PLAN> Plans, List <KPI> KPIs) { int result = 0; PlanManager plan = PlanManager.GetInstance(); ProjectManager prj = ProjectManager.GetInstance(); KpiManager km = KpiManager.GetInstance(); EmployeeManager em = EmployeeManager.GetInstance(); IdeaManager idea = IdeaManager.GetInstance(); string existID = prj.IsExist(Project.IDEA_ID); if (string.IsNullOrEmpty(existID)) { // generate id if (string.IsNullOrWhiteSpace(Project.IDEA_ID)) { Project.IDEA_ID = idea.GenerateId(); idea.Insert(Project.EMP_ID, Project.IDEA_TITLE, Project.BACKGROUND, "", ""); } result = prj.InsertProject(Project); if (result > 0) { foreach (var p in Plans) { plan.InsertPlan(Project.IDEA_ID, p.PLAN_CONTENTS, p.PLAN_DATE); } foreach (var kpi in KPIs) { km.InsertKPI(Project.IDEA_ID, kpi.PRJ_MONTH, kpi.TARGET_VALUE); } try { var emails = em.GetListEmail(); GMailer.GmailUsername = "******"; GMailer.GmailPassword = "******"; GMailer mailer = new GMailer(); mailer.Subject = "[Project Management - New project uploaded]"; mailer.Body = " Employee " + Project.EMP_ID + " Has uploaded a project: " + Project.IDEA_TITLE + ".<br> Please check it out at<br> <a href='http://172.25.215.17/idea'>Project Management</a>"; mailer.IsHtml = true; foreach (var email in emails) { mailer.ToEmail = email.EMAIL.Trim(); mailer.Send(); } } catch { return(Json(result)); } } } else { } return(Json(result)); }
// GET api/{Judge}/{GetJudge}/{id} public Judge GetJudge(int id) { Judge judge = new Judge { JudgeId = id }; IdeaManager manager = new IdeaManager(); judge.Ideas = manager.GetData(id); return(judge); }
// Use this for initialization protected void Start() { animator = gameObject.GetComponent <Animator>(); config = GameObject.Find("configManager").GetComponent <ConfigManager>(); ideaManager = GameObject.Find("ideaManager").GetComponent <IdeaManager>(); navManager = GameObject.Find("navManager").GetComponent <NavigationManager>(); player = GameObject.Find("donny"); activateIdea = ideaManager.activateIdea; }
public EditPage(Ideas idea) { InitializeComponent(); _manager = IdeaManager.DefaultManager; _idea = idea; newIdeaName.Text = idea.Name; newIdeaDescription.Text = idea.Description; BindingContext = new EditPageViewModel(idea); }
public JsonResult Delegate(string ID, string EMP_ID) { if (string.IsNullOrWhiteSpace(ID)) { return(Json(-1)); } var result = 0; IdeaManager im = IdeaManager.GetInstance(); result = im.Delegate(EMP_ID, ID); return(Json(result)); }
public JsonResult DeleteIdea(string ID) { if (string.IsNullOrWhiteSpace(ID)) { return(Json(-1)); } var result = 0; IdeaManager lm = IdeaManager.GetInstance(); lm.DeleteLikeReply(ID); result = lm.Delete(ID); return(Json(result)); }
public JsonResult RegIdea(IDEA idea, string division, string department, int action) { EmployeeManager em = EmployeeManager.GetInstance(); IdeaManager ideaManager = IdeaManager.GetInstance(); int affectedRows = 0; if (action == 0) { affectedRows = ideaManager.Insert(idea.EMP_ID, idea.IDEA_TITLE, idea.DETAIL, idea.QUANTITATIVE, idea.QUALITATIVE); if (affectedRows > 0) { try { var emails = em.GetListEmail(); GMailer.GmailUsername = "******"; GMailer.GmailPassword = "******"; GMailer mailer = new GMailer(); mailer.Subject = "[Project Management - New idea uploaded]"; mailer.Body = " Employee " + idea.EMP_ID + " Has uploaded an idea: " + idea.IDEA_TITLE + ".<br> Please check it out at<br> <a href='http://172.25.215.17/idea'>Project Management</a>"; mailer.IsHtml = true; foreach (var email in emails) { mailer.ToEmail = email.EMAIL.Trim(); mailer.Send(); } } catch { return(Json(affectedRows)); } } } else { affectedRows = ideaManager.Update(idea.ID, idea.EMP_ID, idea.IDEA_TITLE, idea.DETAIL, idea.QUANTITATIVE, idea.QUALITATIVE); } if (!string.IsNullOrWhiteSpace(division)) { em.UpdateDivision(idea.EMP_ID, division.Trim()); } if (!string.IsNullOrWhiteSpace(department)) { em.UpdateDepartment(idea.EMP_ID, department.Trim()); } return(Json(affectedRows)); }
// Track whether the user has authenticated. public IdeaList() { InitializeComponent(); _manager = IdeaManager.DefaultManager; }
public IdeaTournamentPage(IdeaManager anIdeaManager, UserManager aUserManager) { InitializeComponent(); anIdeaTournament = new IdeaTournament(anIdeaManager, aUserManager, false); }