public IHttpActionResult Get() { try { var credMng = new CreditMangement(); var apiResponse = new ApiResponse(); apiResponse.Data = credMng.RetrieveAll(); return(Ok(apiResponse)); } catch (BusinessException bex) { return(InternalServerError(new Exception(bex.ExceptionId + "--" + bex.AppMessage.Message))); } }
private void CreditsForm_Load(object sender, EventArgs e) { var lsttCredits = mngCre.RetrieveAll(); var count1 = 0; foreach (var cre in lsttCredits) { count1++; dataGridCredits.Rows.Add(cre.CreditId, cre.Amount, cre.Rate, cre.Name, cre.Fee, cre.StartDate, cre.Status, cre.OperationalBalance, cre.FK_CUSTOMER_ID); } var lstCustomers = mng.RetrieveAll(); var count = 0; foreach (var c in lstCustomers) { count++; dataGridCustomers.Rows.Add(c.Id, c.Name); } }