Exemple #1
0
        public int UpdateEmpInfo(EmployerLoanDetail EmpAp)
        {
            try
            {
                var original = (from a in uvDb.EmployerLoanDetails where a.LoanApplication_FK == EmpAp.ID select a).First();
                if (original.ID != 0)
                {
                    original.NetMonthlyIncome     = EmpAp.NetMonthlyIncome;
                    original.Occupation           = EmpAp.Occupation;
                    original.EmploymentStatus_FK  = EmpAp.EmploymentStatus_FK;
                    original.EmployerID           = EmpAp.EmployerID;
                    original.Department           = EmpAp.Department;
                    original.Designation          = EmpAp.Designation;
                    original.LengthOfServiceInYrs = EmpAp.LengthOfServiceInYrs;
                    original.OfficialEmailAddress = EmpAp.OfficialEmailAddress;
                    uvDb.SaveChanges();
                }
                return(original.ID);
            }


            catch (Exception ex)
            {
                WebLog.Log(ex.Message.ToString());
                return(0);
            }
        }
Exemple #2
0
        public int UpdateEmployeeInfo(EmployerLoanDetail LoanApp)
        {
            try
            {
                var EmpDetails = uvDb.EmployerLoanDetails.Find(LoanApp.LoanApplication_FK);
                if (EmpDetails != null)
                {
                    EmpDetails.Department           = LoanApp.Department;
                    EmpDetails.Designation          = LoanApp.Designation;
                    EmpDetails.EmployerID           = LoanApp.EmployerID;
                    EmpDetails.EmploymentStatus_FK  = LoanApp.EmploymentStatus_FK;
                    EmpDetails.NetMonthlyIncome     = LoanApp.NetMonthlyIncome;
                    EmpDetails.OfficialEmailAddress = LoanApp.OfficialEmailAddress;
                    EmpDetails.LengthOfServiceInMth = LoanApp.LengthOfServiceInMth;
                    EmpDetails.Occupation           = LoanApp.Occupation;

                    uvDb.SaveChanges();
                }
                return(EmpDetails.ID);
            }
            catch (Exception ex)
            {
                WebLog.Log(ex.Message.ToString());
                return(0);
            }
        }
Exemple #3
0
 public static EmployerLoanDetail CreateEmployerLoanDetails(EmployerLoanDetail instObj)
 {
     try
     {
         // uvDb= new UvlotEntities();
         uvDb.EmployerLoanDetails.Add(instObj);
         uvDb.SaveChanges();
     }
     catch (Exception ex)
     {
         WebLog.Log(ex.Message);
     }
     return(instObj);
 }