コード例 #1
0
        /*  public async System.Threading.Tasks.Task<JsonResult> CheckDenomination(string , string ctrl)
         * {
         *    string productid = "0";
         *    ctrl = ctrl.DecryptParameter().ToUpper();
         *    Dictionary<string, string> Denomitation = new Dictionary<string, string>();
         *
         *
         *    if (MobileNo.Substring(0, 3) == "980" || MobileNo.Substring(0, 3) == "981" || MobileNo.Substring(0, 3) == "982" || (ConfigurationManager.AppSettings["phase"] != null && (ConfigurationManager.AppSettings["phase"].ToString().ToUpper() == "DEVELOPMENT" || ConfigurationManager.AppSettings["phase"].ToString().ToUpper() == "LOCAL") && MobileNo.Substring(0, 3) == "880") && ctrl == "NCELL")//NCELL
         *    {
         *        productid = "2";
         *    }
         *    else if ((MobileNo.Substring(0, 3) == "984" || MobileNo.Substring(0, 3) == "986") && ctrl == "NTPRE")//ntc prepaid
         *    {
         *        productid = "1";
         *    }
         *    else if ((MobileNo.Substring(0, 3) == "974" || MobileNo.Substring(0, 3) == "976") && ctrl == "NTCDMAPRE")//ntc cdma
         *    {
         *        productid = "9";
         *    }
         *    else if ((MobileNo.Substring(0, 3) == "985") && ctrl == "NTPOST")//ntc postpaid
         *    {
         *        productid = "14";
         *    }
         *    else if ((MobileNo.Substring(0, 3) == "975") && ctrl == "NTCDMAPOST") //CDMA Postpaid
         *    {
         *        productid = "10";
         *    }
         *    else if ((MobileNo.Substring(0, 3) == "988" || MobileNo.Substring(0, 3) == "961" || MobileNo.Substring(0, 3) == "962") && ctrl == "SMARTCELL")//smartcell
         *    {
         *        productid = "4";
         *    }
         *    else if ((MobileNo.Substring(0, 3) == "972") && ctrl == "UTL")//UTL
         *    {
         *        productid = "3";
         *
         *    }
         *    else
         *    {
         *        productid = "0";
         *        return Json(new { Denomitation }, JsonRequestBehavior.AllowGet);
         *    }
         *    Dictionary<string, string> dictonary = new Dictionary<string, string>();
         *    dictonary.Add("Subscriberno", MobileNo);
         *    Denomitation = getdenominationlist(productid, dictonary);
         *
         *    return Json(new { Denomitation }, JsonRequestBehavior.AllowGet);
         * }
         */
        public Dictionary <string, string> getdenominationlist(string extra1, Dictionary <string, string> dictionary = null)
        {
            string UserId    = ApplicationUtilities.GetSessionValue("userid").ToString();
            string IpAddress = ApplicationUtilities.GetIP().ToString();

            dictionary.Add("UserId", UserId);
            dictionary.Add("IpAddress", IpAddress);
            return(_ICB.Denomination(extra1, dictionary));
        }
コード例 #2
0
        public Dictionary <string, string> Denomination(string extra1)
        {
            Dictionary <string, string> dictionary = new Dictionary <string, string>();
            string UserId    = ApplicationUtilities.GetSessionValue("userid").ToString();
            string IpAddress = ApplicationUtilities.GetIP().ToString();

            dictionary.Add("UserId", UserId);
            dictionary.Add("IpAddress", IpAddress);
            var oflist = _ICB.Denomination(extra1, dictionary);
            var list   = oflist.ToDictionary(x => x.Value, x => x.Key);

            return(list);
        }