Esempio n. 1
0
        public LoanOfficer bringLOfficer(string id)
        {
            LORepository repo = new LORepository();
            LoanOfficer  data = repo.Get(Convert.ToInt32(id));

            return(data);
        }
Esempio n. 2
0
        public int Delete(int id)
        {
            LoanOfficer loanofficerToDelete = context.LoanOfficers.SingleOrDefault(d => d.LOfficer_Id == id);

            context.LoanOfficers.Remove(loanofficerToDelete);
            return(context.SaveChanges());
        }
Esempio n. 3
0
        public int Update(LoanOfficer LoanOfficer)
        {
            LoanOfficer loanofficerToUpdate = context.LoanOfficers.SingleOrDefault(d => d.LOfficer_Id == LoanOfficer.LOfficer_Id);

            loanofficerToUpdate.LOfficer_name = LoanOfficer.LOfficer_name;

            return(context.SaveChanges());
        }
Esempio n. 4
0
        public int Insert(LoanOfficer LoanOfficer)
        {
            Logininfo li = new Logininfo();

            li.Login_acc_no   = context.LoanOfficers.Count() + 1;
            li.Login_Name     = LoanOfficer.LOfficer_name;
            li.Login_Password = LoanOfficer.LOfficer_Password;
            li.Login_type     = "LOfficer";
            context.Logininfos.Add(li);

            context.LoanOfficers.Add(LoanOfficer);
            return(context.SaveChanges());
        }