public override IList GetListFromDataSet(DataSet ds) { List <ARCustomerPaymentDetailsInfo> CustomerPaymentDetailsList = new List <ARCustomerPaymentDetailsInfo>(); if (ds.Tables.Count > 0) { foreach (DataRow row in ds.Tables[0].Rows) { ARCustomerPaymentDetailsInfo objCustomerPaymentDetailsInfo = (ARCustomerPaymentDetailsInfo)GetObjectFromDataRow(row); CustomerPaymentDetailsList.Add(objCustomerPaymentDetailsInfo); } } return(CustomerPaymentDetailsList); }
public List <ARCustomerPaymentDetailsInfo> GetDefaultPaymentDetails() { List <ARCustomerPaymentDetailsInfo> result = new List <ARCustomerPaymentDetailsInfo>(); ADConfigValuesController objADConfigValuesController = new ADConfigValuesController(); DataSet ds = objADConfigValuesController.GetADConfigValuesByGroup("PaymentMethod"); foreach (DataRow configRow in ds.Tables[0].Rows) { ADConfigValuesInfo objConfigValuesInfo = (ADConfigValuesInfo)objADConfigValuesController.GetObjectFromDataRow(configRow); if (objConfigValuesInfo.ADConfigKeyIsActive) { ARCustomerPaymentDetailsInfo objCustomerPaymentDetailsInfo = new ARCustomerPaymentDetailsInfo(); objCustomerPaymentDetailsInfo.ARCustomerPaymentDetailPaymentMethodType = objConfigValuesInfo.ADConfigKeyValue; objCustomerPaymentDetailsInfo.ARCustomerPaymentDetailPaymentMethodDisplayText = objConfigValuesInfo.ADConfigText; result.Add(objCustomerPaymentDetailsInfo); } } return(result); }