public Object GetApplicationTypes([FromBody] GetApplicationTypes AppTypes) { GetApplicationInfoFail gaif = new GetApplicationInfoFail(); var json = (object)null; try { DataSet ds_custdet1 = new DataSet(); DataTable dt_ApplicationTypes = new DataTable(); string query = "select AppTypeId,AppTypeName from ApplicationTypes"; using (SqlDataAdapter da_custdet = new SqlDataAdapter(query, cnn)) { da_custdet.Fill(ds_custdet1); } if (ds_custdet1.Tables[0].Rows.Count > 0) { AppTypes.AppTypeId = Convert.ToInt32(ds_custdet1.Tables[0].Rows[0]["AppTypeId"].ToString()); AppTypes.AppTypeName = ds_custdet1.Tables[0].Rows[0]["AppTypeName"].ToString(); AppTypes.Status = "Success"; json = Json(AppTypes, JsonRequestBehavior.AllowGet); } else { gaif.Status = "Sucess"; gaif.Messsage = "No Data"; json = Json(gaif, JsonRequestBehavior.AllowGet); } } catch (Exception ec) { gaif.Status = "Sucess"; gaif.Messsage = "Internal Server Error"; json = Json(gaif, JsonRequestBehavior.AllowGet); } return(json); }
public Object GetPaymentDetails([FromBody] RazorPaymentcs Payment) { GetApplicationInfoFail gaif = new GetApplicationInfoFail(); var json = (object)null; try { DataSet ds_custdet1 = new DataSet(); DataTable dt_ApplicationTypes = new DataTable(); string query = "select AppTypeId,AppTypeName from ApplicationTypes"; using (SqlDataAdapter da_custdet = new SqlDataAdapter(query, cnn)) { da_custdet.Fill(ds_custdet1); } if (ds_custdet1.Tables[0].Rows.Count > 0) { json = Json(Payment, JsonRequestBehavior.AllowGet); } else { gaif.Status = "Sucess"; gaif.Messsage = "No Data"; json = Json(gaif, JsonRequestBehavior.AllowGet); } } catch (Exception ec) { gaif.Status = "Sucess"; gaif.Messsage = "Internal Server Error"; json = Json(gaif, JsonRequestBehavior.AllowGet); } return(json); }