public ArrayList GetList(string Condition)
        {
            ArrayList        arrChangePrimaryBusList = new ArrayList();
            ChangePrimaryBus ChangePrimaryBusObj;

            try
            {
                DataTable dtChangePrimaryBus = DH.ExecuteDataTable("select " + strFieldsToSelect + " from " + strTableName + " Where " + Condition);
                foreach (DataRow dr in dtChangePrimaryBus.Rows)
                {
                    ChangePrimaryBusObj = new ChangePrimaryBus();
                    if (dr["ID"] != DBNull.Value)
                    {
                        ChangePrimaryBusObj.ID = int.Parse(dr["ID"].ToString());
                    }
                    if (dr["MSISDN"] != DBNull.Value)
                    {
                        ChangePrimaryBusObj.MSISDN = dr["MSISDN"].ToString();
                    }
                    if (dr["receive_date"] != DBNull.Value)
                    {
                        ChangePrimaryBusObj.receive_date = dr["receive_date"].ToString();
                    }
                    if (dr["SMS_content"] != DBNull.Value)
                    {
                        ChangePrimaryBusObj.SMS_content = dr["SMS_content"].ToString();
                    }
                    if (dr["SMS_Options"] != DBNull.Value)
                    {
                        ChangePrimaryBusObj.SMS_Options = dr["SMS_Options"].ToString();
                    }
                    if (dr["Reply_Option"] != DBNull.Value)
                    {
                        ChangePrimaryBusObj.Reply_Option = dr["Reply_Option"].ToString();
                    }
                    if (dr["status"] != DBNull.Value)
                    {
                        ChangePrimaryBusObj.status = int.Parse(dr["status"].ToString());
                    }
                    if (dr["error_desc"] != DBNull.Value)
                    {
                        ChangePrimaryBusObj.error_desc = dr["error_desc"].ToString();
                    }
                    if (dr["request_type"] != DBNull.Value)
                    {
                        ChangePrimaryBusObj.request_type = int.Parse(dr["request_type"].ToString());
                    }
                    arrChangePrimaryBusList.Add(ChangePrimaryBusObj);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(arrChangePrimaryBusList);
        }
Example #2
0
        public ArrayList GetList(string Condition)
        {
            ArrayList      arrVAT_SHOP_ECAREList = new ArrayList();
            VAT_SHOP_ECARE VAT_SHOP_ECAREObj;

            try
            {
                DataTable dtVAT_SHOP_ECARE = DH.ExecuteDataTable("select " + strFieldsToSelect + " from " + strTableName + " Where " + Condition);
                foreach (DataRow dr in dtVAT_SHOP_ECARE.Rows)
                {
                    VAT_SHOP_ECAREObj = new VAT_SHOP_ECARE();
                    if (dr["REQ_XML"] != DBNull.Value)
                    {
                        VAT_SHOP_ECAREObj.REQ_XML = dr["REQ_XML"].ToString();
                    }
                    if (dr["SEQ_ID"] != DBNull.Value)
                    {
                        VAT_SHOP_ECAREObj.SEQ_ID = dr["SEQ_ID"].ToString();
                    }
                    if (dr["OFFER_NAME"] != DBNull.Value)
                    {
                        VAT_SHOP_ECAREObj.OFFER_NAME = dr["OFFER_NAME"].ToString();
                    }
                    if (dr["STATUS"] != DBNull.Value)
                    {
                        VAT_SHOP_ECAREObj.STATUS = int.Parse(dr["STATUS"].ToString());
                    }
                    if (dr["CHANNEL"] != DBNull.Value)
                    {
                        VAT_SHOP_ECAREObj.CHANNEL = dr["CHANNEL"].ToString();
                    }
                    if (dr["VAT_AMOUNT"] != DBNull.Value)
                    {
                        VAT_SHOP_ECAREObj.VAT_AMOUNT = decimal.Parse(dr["VAT_AMOUNT"].ToString());
                    }
                    if (dr["RECHARGE_AMOUNT"] != DBNull.Value)
                    {
                        VAT_SHOP_ECAREObj.RECHARGE_AMOUNT = int.Parse(dr["RECHARGE_AMOUNT"].ToString());
                    }
                    if (dr["MSISDN"] != DBNull.Value)
                    {
                        VAT_SHOP_ECAREObj.MSISDN = dr["MSISDN"].ToString();
                    }
                    if (dr["TRANSDATE"] != DBNull.Value)
                    {
                        VAT_SHOP_ECAREObj.TRANSDATE = dr["TRANSDATE"].ToString();
                    }
                    if (dr["ResultDesc"] != DBNull.Value)
                    {
                        VAT_SHOP_ECAREObj.ResultDesc = dr["ResultDesc"].ToString();
                    }
                    if (dr["TRACK_ID"] != DBNull.Value)
                    {
                        VAT_SHOP_ECAREObj.TRACK_ID = dr["TRACK_ID"].ToString();
                    }
                    arrVAT_SHOP_ECAREList.Add(VAT_SHOP_ECAREObj);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(arrVAT_SHOP_ECAREList);
        }