internal DataTable Save_LoanMaster(PL_LoanMaster plobj) { try { con = Connection.SetConnection(); cmd = new SqlCommand("SPLoanMaster", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Ind", plobj.Ind); cmd.Parameters.AddWithValue("@CityCode", plobj.CityCode); cmd.Parameters.AddWithValue("@Edcd", plobj.Edcd); cmd.Parameters.AddWithValue("@LoanDesc", plobj.LoanDesc); cmd.Parameters.AddWithValue("@Avrdesc", plobj.Avrdesc); cmd.Parameters.AddWithValue("@IntRate", plobj.IntRate); cmd.Parameters.AddWithValue("@NoOfInst", plobj.NoOfInst); cmd.Parameters.AddWithValue("@LoanAmtRange1", plobj.LoanAmtRange1); cmd.Parameters.AddWithValue("@LoanAmtRange2", plobj.LoanAmtRange2); da = new SqlDataAdapter(cmd); dt = new DataTable(); da.Fill(dt); return(dt); } catch { return(dt); } finally { con.Close(); con.Dispose(); } }
public DataTable SaveData(PL_LoanMaster plobj) { DL_LoanMaster objdl = new DL_LoanMaster(); DataTable dt = new DataTable(); if (plobj.Ind == 0) { return(dt); } else { dt = objdl.Save_LoanMaster(plobj); return(dt); } }