public HttpResponseMessage Put(int id, [FromBody] LoginDetail loginDetail)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.LoginDetails.FirstOrDefault(e => e.ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Login with Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.Mail = loginDetail.Mail;
                        entity.Pan  = loginDetail.Pan;
                        entity.Pass = loginDetail.Pass;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
        public HttpResponseMessage Put(int id, [FromBody] PropHome prophome)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.PropHomes.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.Pr_Loan_For        = prophome.Pr_Loan_For;
                        entity.Pr_Amount          = prophome.Pr_Amount;
                        entity.Pr_Terms           = prophome.Pr_Terms;
                        entity.Pr_Loan_Purpose    = prophome.Pr_Loan_Purpose;
                        entity.Pr_Loan_Prod_Categ = prophome.Pr_Loan_Prod_Categ;
                        entity.Pr_Repay_Mode      = prophome.Pr_Repay_Mode;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
Example #3
0
        public HttpResponseMessage Put(int id, [FromBody] Declar declar)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.Declars.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.ID            = entity.ID;
                        entity.P_ID          = entity.P_ID;
                        entity.Dec_Place     = declar.Dec_Place;
                        entity.Dec_Date      = declar.Dec_Date;
                        entity.Dec_App_Photo = declar.Dec_App_Photo;
                        entity.Dec_App_Sign  = declar.Dec_App_Sign;


                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
        public HttpResponseMessage Put(int id, [FromBody] PurpPersonal purppersonal)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.PurpPersonals.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.ID         = entity.ID;
                        entity.P_ID       = entity.P_ID;
                        entity.Ppu_Reason = purppersonal.Ppu_Reason;


                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
        public HttpResponseMessage Put(int id, [FromBody] PropPersonal proppersonal)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.PropPersonals.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.Ppr_Amount      = proppersonal.Ppr_Amount;
                        entity.Ppr_Terms       = proppersonal.Ppr_Terms;
                        entity.Ppr_Proces_Fee  = proppersonal.Ppr_Proces_Fee;
                        entity.Ppr_Roi         = proppersonal.Ppr_Roi;
                        entity.Ppr_Repayt_Mode = proppersonal.Ppr_Repayt_Mode;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
Example #6
0
        public HttpResponseMessage Put(int id, [FromBody] PropGold propGold)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.PropGolds.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "PropGold with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.ID                = entity.ID;
                        entity.P_ID              = entity.P_ID;
                        entity.Gpr_Loan_Amount   = propGold.Gpr_Loan_Amount;
                        entity.Gpr_Tenure_Months = propGold.Gpr_Tenure_Months;
                        entity.Gpr_Payment_Date  = propGold.Gpr_Payment_Date;
                        entity.Gpr_Int_Pay_Mode  = propGold.Gpr_Int_Pay_Mode;
                        entity.Gpr_Disburs_Mode  = propGold.Gpr_Disburs_Mode;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
Example #7
0
        public HttpResponseMessage Put(int id, [FromBody] EmpGold empgold)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.EmpGolds.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.Ge_Occ_Type         = empgold.Ge_Occ_Type;
                        entity.Ge_Org_Type         = empgold.Ge_Org_Type;
                        entity.Ge_Emp_Buss_Name    = empgold.Ge_Emp_Buss_Name;
                        entity.Ge_Designation      = empgold.Ge_Designation;
                        entity.Ge_Curr_Work_Years  = empgold.Ge_Curr_Work_Years;
                        entity.Ge_Total_work_Years = empgold.Ge_Total_work_Years;
                        entity.Ge_Net_Ann_Inc      = empgold.Ge_Net_Ann_Inc;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
Example #8
0
        public HttpResponseMessage Put(int id, [FromBody] Personal personal)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.Personals.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.ID                 = entity.ID;
                        entity.P_ID               = entity.P_ID;
                        entity.App_Name           = personal.App_Name;
                        entity.App_Fath_Spou_Name = personal.App_Fath_Spou_Name;
                        entity.App_Mother_Name    = personal.App_Mother_Name;
                        entity.App_Status         = personal.App_Status;
                        entity.App_Pan            = personal.App_Pan;
                        entity.App_Doc_Type       = personal.App_Doc_Type;
                        entity.App_Doc_No         = personal.App_Doc_No;
                        entity.App_Doc_Exp        = personal.App_Doc_Exp;
                        entity.App_Ckyc_No        = personal.App_Ckyc_No;
                        entity.App_Dob            = personal.App_Dob;
                        entity.App_Gender         = personal.App_Gender;
                        entity.App_Nationality    = personal.App_Nationality;
                        entity.App_Religion       = personal.App_Religion;
                        entity.App_Category       = personal.App_Category;
                        entity.App_Disability     = personal.App_Disability;
                        entity.App_Education      = personal.App_Education;
                        entity.App_Marital_Status = personal.App_Marital_Status;
                        entity.App_Dependants_No  = personal.App_Dependants_No;
                        entity.App_Email          = personal.App_Email;
                        entity.App_Off_Email      = personal.App_Off_Email;
                        entity.App_Telephone      = personal.App_Telephone;
                        entity.App_Mobile         = personal.App_Mobile;
                        entity.App_Pre_Addr       = personal.App_Pre_Addr;
                        entity.App_Pre_Landmark   = personal.App_Pre_Landmark;
                        entity.App_Pre_Pin        = personal.App_Pre_Pin;
                        entity.App_Pre_City       = personal.App_Pre_City;
                        entity.App_Pre_State      = personal.App_Pre_State;
                        entity.App_Per_Addr       = personal.App_Per_Addr;
                        entity.App_Per_Landmark   = personal.App_Per_Landmark;
                        entity.App_Per_Pin        = personal.App_Per_Pin;
                        entity.App_Per_City       = personal.App_Per_City;
                        entity.App_Per_State      = personal.App_Per_State;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
        public HttpResponseMessage Put(int id, [FromBody] LoanDetail loandetail)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.LoanDetails.FirstOrDefault(e => e.ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Data with Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.Personal_Interest_Rate   = loandetail.Personal_Interest_Rate;
                        entity.Personal_Loan_Tenure     = loandetail.Personal_Loan_Tenure;
                        entity.Personal_Loan_Amount     = loandetail.Personal_Loan_Amount;
                        entity.Personal_Processing_Fees = loandetail.Personal_Processing_Fees;
                        entity.Education_Interest_Rate  = loandetail.Education_Interest_Rate;
                        entity.Education_Loan_Type      = loandetail.Education_Loan_Type;
                        entity.Education_Loan_Amount    = loandetail.Education_Loan_Amount;
                        entity.Education_Concession     = loandetail.Education_Concession;
                        entity.Home_InterestRate_1      = loandetail.Home_InterestRate_1;
                        entity.Home_InterestRate_2      = loandetail.Home_InterestRate_2;
                        entity.Home_InterestRate_3      = loandetail.Home_InterestRate_3;
                        entity.Home_Processing_Fees     = loandetail.Home_Processing_Fees;
                        entity.Gold_Min_Loan            = loandetail.Gold_Min_Loan;
                        entity.Gold_Max_Loan            = loandetail.Gold_Max_Loan;
                        entity.Gold_Margin          = loandetail.Gold_Margin;
                        entity.Gold_Processing_Fees = loandetail.Gold_Processing_Fees;
                        entity.Clients        = loandetail.Clients;
                        entity.Loan_Approved  = loandetail.Loan_Approved;
                        entity.Hours_Support  = loandetail.Hours_Support;
                        entity.Hard_Workers   = loandetail.Hard_Workers;
                        entity.Trusty_City    = loandetail.Trusty_City;
                        entity.Trusty_State   = loandetail.Trusty_State;
                        entity.Trusty_Country = loandetail.Trusty_Country;
                        entity.Trusty_Mail    = loandetail.Trusty_Mail;
                        entity.Trusty_Phone   = loandetail.Trusty_Phone;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
Example #10
0
        public HttpResponseMessage Put(int id, [FromBody] Home home)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.Homes.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.Prop_Type          = home.Prop_Type;
                        entity.Prop_Trans_Type    = home.Prop_Trans_Type;
                        entity.Prop_Builder_Name  = home.Prop_Builder_Name;
                        entity.Prop_Project_Name  = home.Prop_Project_Name;
                        entity.Prop_Building_Name = home.Prop_Building_Name;
                        entity.Prop_Land_Area     = home.Prop_Land_Area;
                        entity.Prop_Cost          = home.Prop_Cost;
                        entity.Prop_Addr          = home.Prop_Addr;
                        entity.Prop_Landmark      = home.Prop_Landmark;
                        entity.Prop_Pin           = home.Prop_Pin;
                        entity.Prop_City          = home.Prop_City;
                        entity.Prop_State         = home.Prop_State;
                        entity.Prop_Country       = home.Prop_Country;
                        entity.Prop_Ownership     = home.Prop_Ownership;
                        entity.Prop_Seller_Name   = home.Prop_Seller_Name;
                        entity.Prop_Seller_Addr   = home.Prop_Seller_Addr;
                        entity.Prop_Const_Stage   = home.Prop_Const_Stage;
                        entity.Prop_Pur_Con_Cost  = home.Prop_Pur_Con_Cost;
                        entity.Prop_Reg_Cost      = home.Prop_Reg_Cost;
                        entity.Prop_Total_Cost    = home.Prop_Total_Cost;
                        entity.Prop_Stamp_Cost    = home.Prop_Stamp_Cost;
                        entity.Prop_Other_Cost    = home.Prop_Other_Cost;
                        entity.Prop_Own_Contrib   = home.Prop_Own_Contrib;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
Example #11
0
        public HttpResponseMessage Put(int id, [FromBody] Reference reference)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.References.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.ID           = entity.ID;
                        entity.P_ID         = entity.P_ID;
                        entity.Ref_Name1    = reference.Ref_Name1;
                        entity.Ref_Relat1   = reference.Ref_Relat1;
                        entity.Ref_Addr1    = reference.Ref_Addr1;
                        entity.Ref_Pin1     = reference.Ref_Pin1;
                        entity.Ref_City1    = reference.Ref_City1;
                        entity.Ref_State1   = reference.Ref_State1;
                        entity.Ref_Country1 = reference.Ref_Country1;
                        entity.Ref_Mob_Tel1 = reference.Ref_Mob_Tel1;
                        entity.Ref_Email1   = reference.Ref_Email1;
                        entity.Ref_Name2    = reference.Ref_Name2;
                        entity.Ref_Relat2   = reference.Ref_Relat2;
                        entity.Ref_Addr2    = reference.Ref_Addr2;
                        entity.Ref_Pin2     = reference.Ref_Pin2;
                        entity.Ref_City2    = reference.Ref_City2;
                        entity.Ref_State2   = reference.Ref_State2;
                        entity.Ref_Country2 = reference.Ref_Country2;
                        entity.Ref_Mob_Tel2 = reference.Ref_Mob_Tel2;
                        entity.Ref_Email2   = reference.Ref_Email2;


                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
Example #12
0
        public HttpResponseMessage Put(int id, [FromBody] Financial financial)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.Financials.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.Fin_Status           = financial.Fin_Status;
                        entity.Fin_Inc_Gross        = financial.Fin_Inc_Gross;
                        entity.Fin_Inc_Net          = financial.Fin_Inc_Net;
                        entity.Fin_Inc_Othr         = financial.Fin_Inc_Othr;
                        entity.Fin_Inc_Total        = financial.Fin_Inc_Total;
                        entity.Fin_Bank1_Name       = financial.Fin_Bank1_Name;
                        entity.Fin_Bank1_Branch     = financial.Fin_Bank1_Branch;
                        entity.Fin_Bank1_Ac_Type    = financial.Fin_Bank1_Ac_Type;
                        entity.Fin_Bank1_Ac_No      = financial.Fin_Bank1_Ac_No;
                        entity.Fin_Bank2_Name       = financial.Fin_Bank2_Name;
                        entity.Fin_Bank2_Branch     = financial.Fin_Bank2_Branch;
                        entity.Fin_Bank2_Ac_Type    = financial.Fin_Bank2_Ac_Type;
                        entity.Fin_Bank2_Ac_No      = financial.Fin_Bank2_Ac_No;
                        entity.Fin_Deposits_Inv     = financial.Fin_Deposits_Inv;
                        entity.Fin_Shares_Inv       = financial.Fin_Shares_Inv;
                        entity.Fin_Insurance_Inv    = financial.Fin_Insurance_Inv;
                        entity.Fin_Mutual_Funds_Inv = financial.Fin_Mutual_Funds_Inv;
                        entity.Fin_Others_Inv       = financial.Fin_Others_Inv;
                        entity.Fin_Total_Inv        = financial.Fin_Total_Inv;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
Example #13
0
        public HttpResponseMessage Put(int id, [FromBody] LoanEdu loanedu)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.LoanEdus.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.Edu_Tut_Fees        = loanedu.Edu_Tut_Fees;
                        entity.Edu_Living_Expen    = loanedu.Edu_Living_Expen;
                        entity.Edu_Travel_Expen    = loanedu.Edu_Travel_Expen;
                        entity.Edu_Other_Expen     = loanedu.Edu_Other_Expen;
                        entity.Edu_Total_Expen     = loanedu.Edu_Total_Expen;
                        entity.Edu_Own_Inc         = loanedu.Edu_Own_Inc;
                        entity.Edu_Scholar_Inc     = loanedu.Edu_Scholar_Inc;
                        entity.Edu_Other_Inc       = loanedu.Edu_Other_Inc;
                        entity.Edu_Loan_Required   = loanedu.Edu_Loan_Required;
                        entity.Edu_Disburs_Details = loanedu.Edu_Disburs_Details;
                        entity.Edu_Mode            = loanedu.Edu_Mode;
                        entity.Edu_Dd_In_Favour_Of = loanedu.Edu_Dd_In_Favour_Of;
                        entity.Edu_Payable_At_For  = loanedu.Edu_Payable_At_For;
                        entity.Edu_DD_Amount       = loanedu.Edu_DD_Amount;
                        entity.Edu_Tt_Swift_Code   = loanedu.Edu_Tt_Swift_Code;
                        entity.Edu_Rtgs_Neft       = loanedu.Edu_Rtgs_Neft;
                        entity.Edu_University_Ac   = loanedu.Edu_University_Ac;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
        public HttpResponseMessage Post([FromBody] LoginDetail loginDetail)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    entities.Configuration.ProxyCreationEnabled = false;
                    entities.LoginDetails.Add(loginDetail);
                    entities.SaveChanges();

                    var message = Request.CreateResponse(HttpStatusCode.Created, loginDetail);
                    message.Headers.Location = new Uri(Request.RequestUri + loginDetail.ID.ToString());
                    return(message);
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
Example #15
0
        public HttpResponseMessage Put(int id, [FromBody] Property property)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.Properties.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.Ag_Prop_Type           = property.Ag_Prop_Type;
                        entity.Ag_Prop_Classif        = property.Ag_Prop_Classif;
                        entity.Ag_Building_Age        = property.Ag_Building_Age;
                        entity.Ag_Market_Value        = property.Ag_Market_Value;
                        entity.Ag_Regis_Value         = property.Ag_Regis_Value;
                        entity.Ag_Prop_Land_Area      = property.Ag_Prop_Land_Area;
                        entity.Ag_Buildup_Area        = property.Ag_Buildup_Area;
                        entity.Ag_Prop_Addr           = property.Ag_Prop_Addr;
                        entity.Ag_Landmark            = property.Ag_Landmark;
                        entity.Ag_Pin                 = property.Ag_Pin;
                        entity.Ag_City                = property.Ag_City;
                        entity.Ag_State               = property.Ag_State;
                        entity.Ag_Country             = property.Ag_Country;
                        entity.Ag_Rev_Mortage         = property.Ag_Rev_Mortage;
                        entity.Ag_Lumpsum_Amount      = property.Ag_Lumpsum_Amount;
                        entity.Ag_Annuity_Periodicity = property.Ag_Annuity_Periodicity;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
Example #16
0
        public HttpResponseMessage Put(int id, [FromBody] Gstin gstin)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.Gstins.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.ID              = entity.ID;
                        entity.P_ID            = entity.P_ID;
                        entity.Gst_Reg         = gstin.Gst_Reg;
                        entity.Gst_Exem        = gstin.Gst_Exem;
                        entity.Gst_Exem_Reason = gstin.Gst_Exem_Reason;
                        entity.Gst_Exem_date   = gstin.Gst_Exem_date;
                        entity.Gst_Reg_Date    = gstin.Gst_Reg_Date;
                        entity.Gst_Reg_Type    = gstin.Gst_Reg_Type;
                        entity.Gst_Eco_Zone    = gstin.Gst_Eco_Zone;
                        entity.Gst_default     = gstin.Gst_default;
                        entity.Gstin_Addr      = gstin.Gstin_Addr;
                        entity.Gst_Pin         = gstin.Gst_Pin;
                        entity.Gst_City        = gstin.Gst_City;
                        entity.Gst_State       = gstin.Gst_State;
                        entity.Gst_Country     = gstin.Gst_Country;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
Example #17
0
        public HttpResponseMessage Put(int id, [FromBody] EmpEduHome empeduhome)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.EmpEduHomes.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.Org_Res_Own        = empeduhome.Org_Res_Own;
                        entity.Org_Employment_Nat = empeduhome.Org_Employment_Nat;
                        entity.Org_Nat            = empeduhome.Org_Nat;
                        entity.Org_Emp_Busi_Nat   = empeduhome.Org_Emp_Busi_Nat;
                        entity.Org_Designation    = empeduhome.Org_Designation;
                        entity.Org_Current_Year   = empeduhome.Org_Current_Year;
                        entity.Org_Total_Year     = empeduhome.Org_Total_Year;
                        entity.Org_Name           = empeduhome.Org_Name;
                        entity.Org_Address        = empeduhome.Org_Address;
                        entity.Org_Pin            = empeduhome.Org_Pin;
                        entity.Org_City           = empeduhome.Org_City;
                        entity.Org_State          = empeduhome.Org_State;
                        entity.Org_Country        = empeduhome.Org_Country;
                        entity.Org_Phone          = empeduhome.Org_Phone;
                        entity.Org_UAN            = empeduhome.Org_UAN;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
        public HttpResponseMessage Put(int id, [FromBody] Status status)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.Status.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.ID                   = entity.ID;
                        entity.P_ID                 = entity.P_ID;
                        entity.Personal_Applied     = status.Personal_Applied;
                        entity.Personal_Status      = status.Personal_Status;
                        entity.Personal_Correction  = status.Personal_Correction;
                        entity.Home_Applied         = status.Home_Applied;
                        entity.Home_Status          = status.Home_Status;
                        entity.Home_Correction      = status.Home_Correction;
                        entity.Education_Applied    = status.Education_Applied;
                        entity.Education_Status     = status.Education_Status;
                        entity.Education_Correction = status.Education_Correction;
                        entity.Gold_Applied         = status.Gold_Applied;
                        entity.Gold_Status          = status.Gold_Status;
                        entity.Gold_Correction      = status.Gold_Correction;


                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
Example #19
0
        public HttpResponseMessage Put(int id, [FromBody] Nri nri)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.Nris.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.ID                = entity.ID;
                        entity.P_ID              = entity.P_ID;
                        entity.Nri_Country_Name  = nri.Nri_Country_Name;
                        entity.Nri_Country_Code  = nri.Nri_Country_Code;
                        entity.Nri_Tax_Resid     = nri.Nri_Tax_Resid;
                        entity.Nri_Jurid_Resid   = nri.Nri_Jurid_Resid;
                        entity.Nri_Tin           = nri.Nri_Tin;
                        entity.Nri_Birth_Country = nri.Nri_Birth_Country;
                        entity.Nri_Birth_City    = nri.Nri_Birth_City;
                        entity.Nri_Jur_Addr      = nri.Nri_Jur_Addr;
                        entity.Nri_City          = nri.Nri_City;
                        entity.Nri_State         = nri.Nri_State;
                        entity.Nri_Zip_Post_Code = nri.Nri_Zip_Post_Code;
                        entity.Nri_Iso           = nri.Nri_Iso;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
Example #20
0
        public HttpResponseMessage Put(int id, [FromBody] Nominee nominee)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.Nominees.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.ID            = entity.ID;
                        entity.P_ID          = entity.P_ID;
                        entity.Nom_App_Name  = nominee.Nom_App_Name;
                        entity.Nom_App_Addr  = nominee.Nom_App_Addr;
                        entity.Nom_Name      = nominee.Nom_Name;
                        entity.Nom_Addr      = nominee.Nom_Addr;
                        entity.Nom_Relation  = nominee.Nom_Relation;
                        entity.Nom_Age       = nominee.Nom_Age;
                        entity.Nom_Dob       = nominee.Nom_Dob;
                        entity.Nom_Guar_Name = nominee.Nom_Guar_Name;
                        entity.Nom_Guar_Age  = nominee.Nom_Guar_Age;
                        entity.Nom_Guar_Addr = nominee.Nom_Guar_Addr;


                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
 public HttpResponseMessage Delete(int id)
 {
     try
     {
         using (loandbEntities entities = new loandbEntities())
         {
             var entity = entities.LoginDetails.FirstOrDefault(e => e.ID == id);
             if (entity == null)
             {
                 return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Login with Id " + id.ToString() + " Not Found!"));
             }
             else
             {
                 entities.LoginDetails.Remove(entity);
                 entities.SaveChanges();
                 return(Request.CreateResponse(HttpStatusCode.OK));
             }
         }
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
     }
 }
        public HttpResponseMessage Put(int id, [FromBody] GoldAppDoc goldappdoc)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.GoldAppDocs.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.ID         = entity.ID;
                        entity.P_ID       = entity.P_ID;
                        entity.Doc1_Name  = goldappdoc.Doc1_Name;
                        entity.Doc1       = goldappdoc.Doc1;
                        entity.Doc2_Name  = goldappdoc.Doc2_Name;
                        entity.Doc2       = goldappdoc.Doc2;
                        entity.Doc3_Name  = goldappdoc.Doc3_Name;
                        entity.Doc3       = goldappdoc.Doc3;
                        entity.Doc4_Name  = goldappdoc.Doc4_Name;
                        entity.Doc4       = goldappdoc.Doc4;
                        entity.Doc5_Name  = goldappdoc.Doc5_Name;
                        entity.Doc5       = goldappdoc.Doc5;
                        entity.Doc6_Name  = goldappdoc.Doc6_Name;
                        entity.Doc6       = goldappdoc.Doc6;
                        entity.Doc7_Name  = goldappdoc.Doc7_Name;
                        entity.Doc7       = goldappdoc.Doc7;
                        entity.Doc8_Name  = goldappdoc.Doc8_Name;
                        entity.Doc8       = goldappdoc.Doc8;
                        entity.Doc9_Name  = goldappdoc.Doc9_Name;
                        entity.Doc9       = goldappdoc.Doc9;
                        entity.Doc10_Name = goldappdoc.Doc10_Name;
                        entity.Doc10      = goldappdoc.Doc10;
                        entity.Doc11_Name = goldappdoc.Doc11_Name;
                        entity.Doc11      = goldappdoc.Doc11;
                        entity.Doc12_Name = goldappdoc.Doc12_Name;
                        entity.Doc12      = goldappdoc.Doc12;
                        entity.Doc13_Name = goldappdoc.Doc13_Name;
                        entity.Doc13      = goldappdoc.Doc13;
                        entity.Doc14_Name = goldappdoc.Doc14_Name;
                        entity.Doc14      = goldappdoc.Doc14;
                        entity.Doc15_Name = goldappdoc.Doc15_Name;
                        entity.Doc15      = goldappdoc.Doc15;
                        entity.Doc16_Name = goldappdoc.Doc16_Name;
                        entity.Doc16      = goldappdoc.Doc16;
                        entity.Doc17_Name = goldappdoc.Doc17_Name;
                        entity.Doc17      = goldappdoc.Doc17;
                        entity.Doc18_Name = goldappdoc.Doc18_Name;
                        entity.Doc18      = goldappdoc.Doc18;
                        entity.Doc19_Name = goldappdoc.Doc19_Name;
                        entity.Doc19      = goldappdoc.Doc19;
                        entity.Doc20_Name = goldappdoc.Doc20_Name;
                        entity.Doc20      = goldappdoc.Doc20;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
Example #23
0
        public HttpResponseMessage Put(int id, [FromBody] EduCourse educourse)
        {
            try
            {
                using (loandbEntities entities = new loandbEntities())
                {
                    var entity = entities.EduCourses.FirstOrDefault(e => e.P_ID == id);
                    if (entity == null)
                    {
                        return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Person with P_Id " + id.ToString() + " Not Found!"));
                    }
                    else
                    {
                        entity.ID                  = entity.ID;
                        entity.P_ID                = entity.P_ID;
                        entity.St_Ssc_Inst         = educourse.St_Ssc_Inst;
                        entity.St_Ssc_Year         = educourse.St_Ssc_Year;
                        entity.St_Ssc_Per          = educourse.St_Ssc_Per;
                        entity.St_Ssc_Class        = educourse.St_Ssc_Class;
                        entity.St_Ssc_Money_Won    = educourse.St_Ssc_Money_Won;
                        entity.St_Hsc_Inst         = educourse.St_Hsc_Inst;
                        entity.St_Hsc_Year         = educourse.St_Hsc_Year;
                        entity.St_Hsc_Per          = educourse.St_Hsc_Per;
                        entity.St_Hsc_Class        = educourse.St_Hsc_Class;
                        entity.St_Hsc_Money_Won    = educourse.St_Hsc_Money_Won;
                        entity.St_LD_Inst          = educourse.St_LD_Inst;
                        entity.St_LD_Year          = educourse.St_LD_Year;
                        entity.St_LD_Per           = educourse.St_LD_Per;
                        entity.St_LD_Class         = educourse.St_LD_Class;
                        entity.St_LD_Money_Won     = educourse.St_LD_Money_Won;
                        entity.St_Exam_Score       = educourse.St_Exam_Score;
                        entity.St_College_Details  = educourse.St_College_Details;
                        entity.St_City             = educourse.St_City;
                        entity.St_State            = educourse.St_State;
                        entity.St_District         = educourse.St_District;
                        entity.St_Pin_Code         = educourse.St_Pin_Code;
                        entity.St_Country          = educourse.St_Country;
                        entity.St_Admission_Status = educourse.St_Admission_Status;
                        entity.St_Univ_Name        = educourse.St_Univ_Name;
                        entity.St_Univ_Person      = educourse.St_Univ_Person;
                        entity.St_Course_Name      = educourse.St_Course_Name;
                        entity.St_Course_Appr      = educourse.St_Course_Appr;
                        entity.St_Admsn            = educourse.St_Admsn;
                        entity.St_Course_Cat       = educourse.St_Course_Cat;
                        entity.St_Course_Type      = educourse.St_Course_Type;
                        entity.St_Course_Start     = educourse.St_Course_Start;
                        entity.St_Course_End       = educourse.St_Course_End;
                        entity.St_Morat1           = educourse.St_Morat1;
                        entity.St_Morat2           = educourse.St_Morat2;
                        entity.St_Total_Morat      = educourse.St_Total_Morat;
                        entity.St_Emi_Repay        = educourse.St_Emi_Repay;
                        entity.St_Loan_Period      = educourse.St_Loan_Period;
                        entity.St_Int_Serv         = educourse.St_Int_Serv;
                        entity.St_Exp_Income       = educourse.St_Exp_Income;
                        entity.St_Clg_Name         = educourse.St_Clg_Name;
                        entity.St_Course_Persuid   = educourse.St_Course_Persuid;
                        entity.St_Compl_Date       = educourse.St_Compl_Date;

                        entities.SaveChanges();

                        return(Request.CreateResponse(HttpStatusCode.OK));
                    }
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }