Esempio n. 1
0
        public List <PhoneCatModel> GetPhoneCatList(PhoneCatModel mPhoneCat, ObjectControls oCtrl)
        {
            string sql = @"SELECT CAT_ID,CAT_DESC,CAT_RATE
                                  FROM PHONE_CAT
                                WHERE 1=1 ";

            oCtrl.Helper(oCtrl.Exsit(MCtrl.ByCatId) && oCtrl.Append(ref sql, " AND CAT_ID=" + mPhoneCat.CatId));

            sdr = ExecuteReader(sql);
            using (sdr)
            {
                List <PhoneCatModel> listPhoneCat = new List <PhoneCatModel>();
                while (sdr.Read())
                {
                    PhoneCatModel mCatNew = new PhoneCatModel();
                    mCatNew.CatId   = ToInt32(sdr["CAT_ID"]);
                    mCatNew.CatDesc = ToString(sdr["CAT_DESC"]);
                    mCatNew.CatRate = ToDouble(sdr["CAT_RATE"]);
                    listPhoneCat.Add(mCatNew);
                }
                return(listPhoneCat);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 获取电话拨打类别以及其计费标准
 /// </summary>
 /// <param name="mPhoneCat"></param>
 /// <param name="oCtrl"></param>
 /// <returns></returns>
 public List <PhoneCatModel> GetPhoneCatList(PhoneCatModel mPhoneCat, ObjectControls oCtrl)
 {
     return(dCall.GetPhoneCatList(mPhoneCat, oCtrl));
 }