public static string IssueSMSBlockRequest(ESNInfo info)
        {
            try
            {
                wsmsService.wsMessageHeader = getHeader();
                SecurityHelper.prepareSoapContext(wsmsService.RequestSoapContext);

                WSM.ChangeServicePlansRequest cspRequest = new WSM.ChangeServicePlansRequest();
                cspRequest.mdn = info.MDN;

                WSM.ProductDeployment deployment = new WSM.ProductDeployment();
                deployment.serviceCode = "321PLAN2";
                deployment.serviceEffectiveDateSpecified  = true;
                deployment.serviceEffectiveDate           = DateTime.Now;
                deployment.serviceExpirationDateSpecified = false;
                // cspRequest.pricePlan = deployment;

                List <WSM.ProductDeployment> list    = new List <WSM.ProductDeployment>();
                List <WSM.ProductDeployment> Oldlist = new List <WSM.ProductDeployment>();

                var dt = DataLayer_WholesaleSubscriptionDetailService.GetPpSocList(info.CSA);

                var soc = from r in dt.AsEnumerable()
                          where r.Field <string>("socDescription") == "MO/MT SMS BLOCKING"
                          select r.Field <string>("soc");

                WSM.ProductDeployment deployment3 = new WSM.ProductDeployment();
                deployment3.serviceCode                    = soc.FirstOrDefault().ToString();
                deployment3.serviceEffectiveDate           = DateTime.Now;
                deployment3.serviceEffectiveDateSpecified  = true;
                deployment3.serviceExpirationDateSpecified = false;
                list.Add(deployment3);

                if (list.Count > 0 || Oldlist.Count > 0)
                {
                    cspRequest.serviceList = list.ToArray();
                    WSM.ConfirmMsg cnfMsg = wsmsService.ChangeServicePlans(cspRequest);
                    return(cnfMsg.confirmMsg);
                }
            }
            catch
            {
                throw;
            }
            return(string.Empty);
        }
コード例 #2
0
 public string ChangeServicePlans(ESNInfo info, bool OldLocalCallOnly, bool OldVoiceMail, bool OldSMSBlock)
 {
     return(DataLayer_WholesaleSubscriptionModifyService.ChangeServicePlans(info, OldLocalCallOnly, OldVoiceMail, OldSMSBlock));
 }
コード例 #3
0
 public string IssueSMSBlockRequest(ESNInfo info)
 {
     return(DataLayer_WholesaleSubscriptionModifyService.IssueSMSBlockRequest(info));
 }
        public static string ChangeServicePlans(ESNInfo info, bool OldLocalCallOnly, bool OldVoiceMail, bool OldSMSBlock)
        {
            try
            {
                wsmsService.wsMessageHeader = getHeader();
                SecurityHelper.prepareSoapContext(wsmsService.RequestSoapContext);

                WSM.ChangeServicePlansRequest cspRequest = new WSM.ChangeServicePlansRequest();
                cspRequest.mdn = info.MDN;

                WSM.ProductDeployment deployment = new WSM.ProductDeployment();
                deployment.serviceCode = "321PLAN2";
                deployment.serviceEffectiveDateSpecified  = true;
                deployment.serviceEffectiveDate           = DateTime.Now;
                deployment.serviceExpirationDateSpecified = false;

                List <WSM.ProductDeployment> list    = new List <WSM.ProductDeployment>();
                List <WSM.ProductDeployment> Oldlist = new List <WSM.ProductDeployment>();

                var dt = DataLayer_WholesaleSubscriptionDetailService.GetPpSocList(info.CSA);


                //Set the old services

                if (OldLocalCallOnly == true && info.LocalCallOnly == false)
                {
                    var soc = from r in dt.AsEnumerable()
                              where r.Field <string>("socDescription") == "LOCAL CALLING ONLY"
                              select r.Field <string>("soc");

                    WSM.ProductDeployment item = new WSM.ProductDeployment();
                    item.serviceCode                    = soc.FirstOrDefault().ToString();
                    item.serviceExpirationDate          = DateTime.Now;
                    item.serviceEffectiveDateSpecified  = false;
                    item.serviceExpirationDateSpecified = true;
                    Oldlist.Add(item);
                }
                if (OldVoiceMail == true && info.VoiceMail == false)
                {
                    var soc = from r in dt.AsEnumerable()
                              where r.Field <string>("socDescription") == "VOICEMAIL"
                              select r.Field <string>("soc");

                    WSM.ProductDeployment deployment4 = new WSM.ProductDeployment();
                    deployment4.serviceCode                    = soc.FirstOrDefault().ToString();
                    deployment4.serviceExpirationDate          = DateTime.Now;
                    deployment4.serviceEffectiveDateSpecified  = false;
                    deployment4.serviceExpirationDateSpecified = true;
                    Oldlist.Add(deployment4);
                }
                if (OldSMSBlock == true && info.SMSBlock == false)
                {
                    var soc = from r in dt.AsEnumerable()
                              where r.Field <string>("socDescription") == "MO/MT SMS BLOCKING"
                              select r.Field <string>("soc");

                    WSM.ProductDeployment deployment3 = new WSM.ProductDeployment();
                    deployment3.serviceCode                    = soc.FirstOrDefault().ToString();
                    deployment3.serviceExpirationDate          = DateTime.Now;
                    deployment3.serviceEffectiveDateSpecified  = false;
                    deployment3.serviceExpirationDateSpecified = true;
                    Oldlist.Add(deployment3);
                }

                if (Oldlist.Count > 0)
                {
                    cspRequest.oldServiceList = Oldlist.ToArray();
                }

                // New services
                if (info.LocalCallOnly && OldLocalCallOnly == false)
                {
                    var soc = from r in dt.AsEnumerable()
                              where r.Field <string>("socDescription") == "LOCAL CALLING ONLY"
                              select r.Field <string>("soc");

                    WSM.ProductDeployment item = new WSM.ProductDeployment();
                    item.serviceCode                    = soc.FirstOrDefault().ToString();
                    item.serviceEffectiveDate           = DateTime.Now;
                    item.serviceEffectiveDateSpecified  = true;
                    item.serviceExpirationDateSpecified = false;
                    list.Add(item);
                }
                if (info.SMSBlock && OldSMSBlock == false)
                {
                    var soc = from r in dt.AsEnumerable()
                              where r.Field <string>("socDescription") == "MO/MT SMS BLOCKING"
                              select r.Field <string>("soc");

                    WSM.ProductDeployment deployment3 = new WSM.ProductDeployment();
                    deployment3.serviceCode                    = soc.FirstOrDefault().ToString();
                    deployment3.serviceEffectiveDate           = DateTime.Now;
                    deployment3.serviceEffectiveDateSpecified  = true;
                    deployment3.serviceExpirationDateSpecified = false;
                    list.Add(deployment3);
                }
                if (info.VoiceMail && OldVoiceMail == false)
                {
                    var soc = from r in dt.AsEnumerable()
                              where r.Field <string>("socDescription") == "VOICEMAIL"
                              select r.Field <string>("soc");

                    WSM.ProductDeployment deployment4 = new WSM.ProductDeployment();
                    deployment4.serviceCode                    = soc.FirstOrDefault().ToString();
                    deployment4.serviceEffectiveDate           = DateTime.Now;
                    deployment4.serviceEffectiveDateSpecified  = true;
                    deployment4.serviceExpirationDateSpecified = false;
                    list.Add(deployment4);
                }

                if (list.Count > 0 || Oldlist.Count > 0)
                {
                    cspRequest.serviceList = list.ToArray();
                    WSM.ConfirmMsg cnfMsg = wsmsService.ChangeServicePlans(cspRequest);
                    return(cnfMsg.confirmMsg);
                }
            }
            catch
            {
                throw;
            }
            return(string.Empty);
        }