Beispiel #1
0
        public ActionResult CreateExperience(Experiences basicInformation)
        {
            DBmanager dBmanager = new DBmanager();

            dBmanager.CreateExperience(basicInformation);
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public ActionResult DetailExp(int id)
        {
            DBmanager   manager    = new DBmanager();
            Experiences experience = manager.GetByExp(id);

            return(View(experience));
        }
Beispiel #3
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Title,Explain1,Explain2")] Experiences experiences)
        {
            if (id != experiences.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(experiences);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ExperiencesExists(experiences.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(experiences));
        }
Beispiel #4
0
        public ActionResult EditExperiences(Experiences experience)
        {
            DBmanager dBmanager = new DBmanager();

            dBmanager.UpdateExperiences(experience);
            return(RedirectToAction("Index"));
        }
 public bool Navigate(Experiences destination, object argument)
 {
     var success =  base.Navigate(destination.ToString(), argument);
     if (success)
         _currentExperience = destination;
     return success;
 }
Beispiel #6
0
        public ActionResult DeleteExp(int id)
        {
            Experiences tx = repos.Find(x => x.ID == id);

            repos.TDelete(tx);
            return(RedirectToAction("Index"));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            Experiences experiences = db.Experiences.Find(id);

            db.Experiences.Remove(experiences);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #8
0
 public ActionResult Create(Experiences experiences)
 {
     if (ModelState.IsValid)
     {
         experienceManager.Insert(experiences);
         return(RedirectToAction("Index"));
     }
     return(View(experiences));
 }
 public ActionResult Edit([Bind(Include = "Id,Experience,Workplace,Duration,Description")] Experiences experiences)
 {
     if (ModelState.IsValid)
     {
         db.Entry(experiences).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(experiences));
 }
        public ActionResult Create([Bind(Include = "Id,Experience,Workplace,Duration,Description")] Experiences experiences)
        {
            if (ModelState.IsValid)
            {
                db.Experiences.Add(experiences);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(experiences));
        }
Beispiel #11
0
        public async Task <IActionResult> Create([Bind("Id,Title,Explain1,Explain2")] Experiences experiences)
        {
            if (ModelState.IsValid)
            {
                _context.Add(experiences);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(experiences));
        }
Beispiel #12
0
        public ActionResult FindExp(Experiences p)
        {
            Experiences tx = repos.Find(x => x.ID == p.ID);

            tx.Title       = p.Title;
            tx.Subtitle    = p.Subtitle;
            tx.Date        = p.Date;
            tx.Explanation = p.Explanation;
            repos.TUpdate(tx);
            return(RedirectToAction("Index"));
        }
Beispiel #13
0
        /// <summary>
        /// Remove an agent with all the relations
        /// </summary>
        /// <param name="agent"></param>
        public void RemoveAgent(DeepRLAgentParameters agent)
        {
            ClearAgent(agent);
            Experiences.RemoveRange(Experiences.Where(e => e.AgentId == agent.Id));
            SimulationResults.RemoveRange(SimulationResults.Where(e => e.AgentId == agent.Id));

            Entry(agent).Reference(a => a.StockExchange).Load();
            StockExchangeParameters.Remove(agent.StockExchange);

            DeepRLAgentParameters.Remove(agent);
        }
Beispiel #14
0
        public void ReadExperiences()
        {
            // local variable
            var experiences = Experience.GetExperiences();

            Experiences.Clear();
            foreach (var exp in experiences)
            {
                Experiences.Add(exp);
            }
        }
 EstateExperienceInfo IEstateExperienceServiceThisInterface.this[uint estateID, UEI experienceID]
 {
     get
     {
         EstateExperienceInfo info;
         if (!Experiences.TryGetValue(estateID, experienceID, out info))
         {
             throw new KeyNotFoundException();
         }
         return(info);
     }
 }
        //首頁維護
        public void SelectHome_maintenance()
        {
            SelectIndexphotoe();
            Indexphoto_number = Indexphotos.Where(p => p.Issued == true).Count();

            SelectIndexvideolinks();
            Indexvideolink_number = Indexvideolinks.Where(p => p.Issued == true).Count();

            Experience_VM experience_VM = new Experience_VM();

            Experiences       = experience_VM.SelectExperience();
            Experience_number = Experiences.Where(p => p.Home_issued == true).Count();
        }
Beispiel #17
0
 public override void RemoveAllReferences()
 {
     Chapters.Clear();
     Components.Clear();
     Documentations.Clear();
     Experiences.Clear();
     Files.Clear();
     Maintenances.Clear();
     OrderConfirmations.Clear();
     Safeties.Clear();
     ServiceLogs.Clear();
     SubProjects.Clear();
 }
        // GET: Experiences/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Experiences experiences = db.Experiences.Find(id);

            if (experiences == null)
            {
                return(HttpNotFound());
            }
            return(View(experiences));
        }
Beispiel #19
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Experiences experiences = experienceManager.Find(x => x.Id == id.Value);

            if (experiences == null)
            {
                return(HttpNotFound());
            }
            return(View(experiences));
        }
Beispiel #20
0
        public ActionResult EditExperiences(int id)
        {
            DBmanager          dBmanager   = new DBmanager();
            Experiences        experience  = dBmanager.GetByExp(id);
            DBmanager          S           = new DBmanager();
            List <Supervisors> Supervisors = S.GetSupervisors();

            ViewBag.supervisor = Supervisors;
            DBmanager          dB          = new DBmanager();
            List <Departments> departments = dB.GetDepartments();

            ViewBag.department = departments;
            return(View(experience));
        }
Beispiel #21
0
        private void AwardEXP(GameObject instigator)
        {
            // the one causing the damage gets points (should only be the player)
            Experiences experienceComponent = instigator.GetComponent <Experiences>();

            // null check will prevent enemies from getting experience points
            // since they do not have a 'Experiences' attached to them
            if (experienceComponent != null)
            {
                // gives the player exp points by searching in the right place in the enemy's stats
                int howMuchExpToGain = GetComponent <BaseStats>().GetStats(StatEnum.ExperienceReward);
                experienceComponent.GainExperience(howMuchExpToGain);
            }
        }
Beispiel #22
0
 public ActionResult Edit(Experiences experiences)
 {
     if (ModelState.IsValid)
     {
         Experiences exp = experienceManager.Find(x => x.Id == experiences.Id);
         exp.Institution = experiences.Institution;
         exp.Department  = experiences.Department;
         exp.Time        = experiences.Time;
         exp.Text        = experiences.Text;
         exp.City        = experiences.City;
         exp.IsActive    = experiences.IsActive;
         return(RedirectToAction("Index"));
     }
     return(View(experiences));
 }
Beispiel #23
0
        private void RefreshExperiences()
        {
            Experiences.Clear();

            for (var i = 1; i <= ExperienceNumber; i++)
            {
                var resource = Application.Current.TryFindResource(string.Format(ExperienceResourceNameTemplate, i));

                if (resource == null)
                {
                    continue;
                }

                Experiences.Add(resource.ToString());
            }
        }
        public override int GetHashCode()
        {
            var hashCode = -1413490195;

            hashCode = hashCode * -1521134295 + Sum.GetHashCode();
            hashCode = hashCode * -1521134295 + Experiences.GetHashCode();
            hashCode = hashCode * -1521134295 + Stamina.GetHashCode();
            hashCode = hashCode * -1521134295 + Goalkeeper.GetHashCode();
            hashCode = hashCode * -1521134295 + Tackling.GetHashCode();
            hashCode = hashCode * -1521134295 + Header.GetHashCode();
            hashCode = hashCode * -1521134295 + Winger.GetHashCode();
            hashCode = hashCode * -1521134295 + Creativity.GetHashCode();
            hashCode = hashCode * -1521134295 + Passing.GetHashCode();
            hashCode = hashCode * -1521134295 + Attacker.GetHashCode();
            return(hashCode);
        }
        protected async Task LoadMoreExperiences()
        {
            PageIndex++;
            AjaxLoaderDisplayClass = "d-inline-block";
            ButtonMoreDisplayClass = "d-none";
            var experiences = await ApiService.GetExperiencesAsync(PageIndex, PAGE_SIZE);

            if (experiences.Count == PAGE_SIZE)
            {
                ButtonMoreDisplayClass = "d-inline-block";
            }

            Experiences = Experiences.Concat(experiences);
            await JsRuntime.InvokeVoidAsync("triggerScroll");

            AjaxLoaderDisplayClass = "d-none";
        }
Beispiel #26
0
        public ActionResult Delete(int?id)
        {
            Experiences experiences = experienceManager.Find(x => x.Id == id.Value);

            if (experiences != null)
            {
                int res = experienceManager.Delete(experiences);
                if (res > 0)
                {
                    return(Json(new { hasError = false, Message = $" Deneyim bilgisi başarılı bir şekilde silindi." }, JsonRequestBehavior.AllowGet));
                    //return Json(new { hasError = false, Massage = "Personel başarılı bir şekilde silindi." });
                }
                else
                {
                    return(Json(new { hasError = true, Message = $" Deneyim bilgisi silinirken hata oluştu." }, JsonRequestBehavior.AllowGet));
                    //return Json(new { hasError = true, Message = "Personel silinirken hata oluştu." });
                }
            }
            return(Json(new { results = true, Message = "Böyle bir deneyim bulunamadı." }, JsonRequestBehavior.AllowGet));
        }
Beispiel #27
0
        public List <Experiences> Get(int UserId)
        {
            var reader      = this.GetReader($"select * from Experiences where UserId='{UserId}' ");
            var experiences = new List <Experiences>();

            while (reader.Read())
            {
                var experience = new Experiences();
                experience.ExpId              = reader.GetInt32(0);
                experience.UserId             = reader.GetInt32(1);
                experience.CurrentDesignation = reader.GetString(2);
                experience.CurrentCompney     = reader.GetString(3);
                experience.WorkingSince       = reader.GetString(4);
                experience.DurationOfNotice   = reader.GetString(5);
                experience.Role         = reader.GetString(6);
                experience.AnnualSalary = reader.GetString(7);

                experiences.Add(experience);
            }
            return(experiences);
        }
        private async void btnAdd_ClickAsync(object sender, EventArgs e)
        {
            using (var client = createClient())
            {
                //get value from textBox
                var companyName = textBox1.Text;

                if (textBox1.Text == "")
                {
                    MessageBox.Show("Por favor insira uma empresa antes de continuar.", "Campo Vazio",
                                    MessageBoxButtons.OK);
                }
                else
                {
                    //Creating a new experience
                    Experiences newExperience = new Experiences();
                    newExperience.companyname = companyName;

                    try
                    {
                        //posting and clearing the grid and filling it again
                        response = await client.PostAsJsonAsync("experiences", newExperience);

                        if (response.IsSuccessStatusCode)
                        {
                            MessageBox.Show(companyName + " adicionada(O) com sucesso", "POST METHOD",
                                            MessageBoxButtons.OK);
                            textBox1.Text = "Empresa";
                            dataGridView1.Rows.Clear();
                            fillDataAsync();
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show("Verifique se o JSON está ligado", "Erro de conexão",
                                        MessageBoxButtons.OK);
                    }
                }
            }
        }
        private async void btnUpdate_ClickAsync(object sender, EventArgs e)
        {
            using (var client = createClient())
            {
                if (txtExpName.Text == "")
                {
                    MessageBox.Show("Por favor insira uma empresa antes de continuar.", "Campo Vazio",
                                    MessageBoxButtons.OK);
                }
                else
                {
                    try
                    {
                        var companyUpdateName = txtExpName.Text;

                        Experiences newExperience = new Experiences();

                        newExperience.companyname = companyUpdateName;

                        response = await client.PutAsJsonAsync("experiences/" + myValue, newExperience);

                        if (response.IsSuccessStatusCode)
                        {
                            MessageBox.Show("Experiência atualizada com sucesso", "UPDATE METHOD",
                                            MessageBoxButtons.OK);

                            txtExpName.ResetText();

                            dataGridView1.Rows.Clear();
                            fillDataAsync();
                        }
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine("JSON offline...");
                    }
                }
            }
        }
Beispiel #30
0
        public List <Experiences> GetExperienceLevel()
        {
            var _db    = new DBUtility();
            var result = new List <Experiences>();
            var _dt    = new DataTable();

            _cmd = new SqlCommand();

            _cmd.CommandType = CommandType.StoredProcedure;
            _cmd.CommandText = "GP_SP_GetExperienceLevel";
            _dt = _db.FillDataTable(_cmd, _dt);
            if (_dt.Rows.Count > 0)
            {
                foreach (DataRow dr in _dt.Rows)
                {
                    var temp = new Experiences();
                    temp.ID   = Convert.ToInt32(dr["ID"]);
                    temp.Name = Convert.ToString(dr["Name"]);
                    result.Add(temp);
                }
            }
            return(result);
        }
Beispiel #31
0
        public async Task <ActionResult <UserModel> > PostUpdate(VolunteerProfileModel model)
        {
            var user = await GetUserAsync();

            user !.Volunteer !.Bio  = model.Bio;
            user !.Volunteer !.Name = model.Name;
            user !.Volunteer !.PrimaryPhoneNumber   = model.PrimaryPhoneNumber;
            user !.Volunteer !.SecondaryPhoneNumber = model.SecondaryPhoneNumber;
            user !.Volunteer !.ZipCode  = Int32.Parse(model.ZipCode);
            user !.Volunteer !.IsActive = model.IsActive;

            user !.Volunteer.Experiences.Clear();
            var tags = await Context.Tags.ToDictionaryAsync(t => t.Label, t => t.Value);

            foreach (string label in model.Experiences)
            {
                if (tags.TryGetValue(label, out int value))
                {
                    user !.Volunteer !.Experiences.Add(new VolunteerTag {
                        VolunteerId = user.Id, TagValue = value
                    });
                }
                else
                {
                    var tag = Context.Tags.Add(new Tag {
                        Label = label
                    });
                    user !.Volunteer !.Experiences.Add(new VolunteerTag {
                        VolunteerId = user.Id, Tag = tag.Entity
                    });
                }
            }

            await Context.SaveChangesAsync();

            return(Ok());
        }
 public bool Navigate(Experiences destination)
 {
     return Navigate(destination, null);
 }