public RTATransactionTypes GetTransactionType(long ID) { try { DataSet data = new DataSet(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@ID", ID); data = new ADODataFunction().ExecuteDataset(Constants.Procedures.GetRTATransactionTypeByID, param, CommandType.StoredProcedure); RTATransactionTypes model = data.Tables[0].AsEnumerable().Select(a => new RTATransactionTypes { ID = a.Field <long>("ID") , RTATransactionType = a.Field <string>("RTATransactionType") , Remarks = a.Field <string>("Remarks") , RTAId = a.Field <long>("RTAId") , TransactionTypeID = a.Field <int>("TransactionTypeID") , IsActive = a.Field <bool>("IsActive") , CreatedBy = a.Field <long>("CreatedBy") , CreatedOn = a.Field <DateTime>("CreatedOn") }).FirstOrDefault(); return(model); } catch (Exception ex) { return(null); } }