Beispiel #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            Ocupation ocupation = await db.Ocupations.FindAsync(id);

            db.Ocupations.Remove(ocupation);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public async Task <ActionResult> Edit([Bind(Include = "OcupationId,Name")] Ocupation ocupation)
        {
            if (ModelState.IsValid)
            {
                db.Entry(ocupation).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(ocupation));
        }
Beispiel #3
0
        public async Task <ActionResult> Edit(Ocupation ocupation)
        {
            if (ModelState.IsValid)
            {
                _db.Entry(ocupation).State = EntityState.Modified;
                await _db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(ocupation));
        }
Beispiel #4
0
        public async Task <ActionResult> Create([Bind(Include = "OcupationId,Name")] Ocupation ocupation)
        {
            if (ModelState.IsValid)
            {
                db.Ocupations.Add(ocupation);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(ocupation));
        }
Beispiel #5
0
 public Person(string name, string surname,
               string birthCountry, int postCode,
               Ocupation ocupation, int age)
 {
     Name         = name;
     Surname      = surname;
     BirthContury = birthCountry;
     PostCode     = postCode;
     tOcupation   = ocupation;
     Age          = age;
     isParent     = false;
 }
Beispiel #6
0
        public async Task <ActionResult> Create(Ocupation ocupation)
        {
            if (ModelState.IsValid)
            {
                _db.Ocupations.Add(ocupation);
                await _db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(ocupation));
        }
Beispiel #7
0
 public LoanRequestMainReport(int loanRequestId,
     string CURP,
     string names,
     string lastName,
     string secondLastName,
     string clltrlNames,
     string clltrlLastName,
     string clltrlSecondLastName,
     DateTime birthDate,
     Gender gender,
     Ocupation ocupation,
     EducationLevel educationLevel,
     Address address,
     ContactInformation contactInformation,
     string trackingCode,
     UInt64 internalTrackingCode,
     string userName,
     LoanRequestStatus loanRequestStatus,
     DateTime loanRequestDate,
     DateTime? loanAuthorizationDate,
     LoanType loanType,
     decimal loanedAmount,
     string sector,
     string subsector,
     string branch)
 {
     this._loanRequestId = loanRequestId;
     this._curp = CURP;
     this._names = names;
     this._lastName = lastName;
     this._secondLastName = secondLastName;
     this._collateralNames = clltrlNames;
     this._collateralLastName = clltrlLastName;
     this._collateralSecondLastName = clltrlSecondLastName;
     this._birthDate = birthDate;
     this._gender = gender;
     this._ocupation = ocupation;
     this._educationLevel = educationLevel;
     this._address = address;
     this._contactInformation = contactInformation;
     this._trackingCode = trackingCode;
     this._internalTrackingCode = internalTrackingCode;
     this._username = userName;
     this._loanRequestStatus = loanRequestStatus;
     this._loanRequestDate = loanRequestDate;
     this._loanAuthorizationDate = loanAuthorizationDate;
     this._loanType = loanType;
     this._loanedAmount = loanedAmount;
     this._sector = sector;
     this._subsector = subsector;
     this._branch = branch;
 }
Beispiel #8
0
        // GET: Ocupations/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Ocupation ocupation = await db.Ocupations.FindAsync(id);

            if (ocupation == null)
            {
                return(HttpNotFound());
            }
            return(View(ocupation));
        }
Beispiel #9
0
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(View("Error"));
            }
            Ocupation ocupation = await _db.Ocupations.FindAsync(id);

            if (ocupation == null)
            {
                return(View("Error"));
            }
            return(View(ocupation));
        }
Beispiel #10
0
 public Person(string name, string surname,
               string birthContury, int postCode,
               Ocupation ocupation, int age,
               List <string> childrens)
 {
     Name         = name;
     Surname      = surname;
     BirthContury = birthContury;
     PostCode     = postCode;
     tOcupation   = ocupation;
     Age          = age;
     Childrens    = childrens;
     isParent     = true;
 }
Beispiel #11
0
 public Goblin()
 {
     this.name           = "";
     this.current_health = max_health;
     this.current_mana   = max_mana;
     this.coloration     = GoblinLoader.Instance.GetRandomColoration();
     this.ocupation      = GoblinLoader.Instance.GetRandomOcupation();
     this.equipments     = GoblinLoader.Instance.GetRandomEquipmentsByType(this.ocupation.equipType);
     this.skills         = new List <Skill>();
     foreach (int skillId in this.ocupation.skills)
     {
         this.skills.Add(GoblinLoader.Instance.GetSkillsById(skillId));
     }
 }
 public LoanTrackingSolidarityGroupsReport(int groupId,
     string solidarityGroupName,
     Address solidarityGroupAddress,
     string CURP,
     string names,
     string lastName,
     string secondLastName,
     Gender gender,
     Ocupation ocupation,
     EducationLevel educationLevel,
     Address address,
     ContactInformation contactInformation,
     string trackingCode,
     UInt64 internalTrackingCode,
     LoanRequestStatus loanRequestStatus,
     DateTime loanRequestDate,
     DateTime? loanAuthorizationDate,
     LoanType loanType,
     decimal loanedAmount)
 {
     this._groupId = groupId;
     this._solidarityGroupName = solidarityGroupName;
     this._solidarityGroupAddress = solidarityGroupAddress;
     this._curp = CURP;
     this._names = names;
     this._lastName = lastName;
     this._secondLastName = secondLastName;
     this._gender = gender;
     this._ocupation = ocupation;
     this._educationLevel = educationLevel;
     this._address = address;
     this._contactInformation = contactInformation;
     this._trackingCode = trackingCode;
     this._internalTrackingCode = internalTrackingCode;
     this._loanRequestStatus = loanRequestStatus;
     this._loanRequestDate = loanRequestDate;
     this._loanAuthorizationDate = loanAuthorizationDate;
     this._loanType = loanType;
     this._loanedAmount = loanedAmount;
 }
Beispiel #13
0
 public IEnumerable <UserAccount> GetUserAccounts([Parent] Ocupation ocupation, IResolverContext ctx)
 {
     return(_ovidDb.UserAccounts.Where(m => m.OcupationId == ocupation.OcupationId).ToList());
 }