Exemplo n.º 1
0
 /// <summary>
 /// Send Message to Customer when Customer's zip code matches with shops zip code.
 /// Shop this may send multiple messages depending on how much shops added this zip code into zip code configuration list,
 /// the message can be configured by shop user using On-demand-Campaign
 /// </summary>
 /// <param name="objBodyShop"></param>
 /// <param name="objUser"></param>
 private void SendZipCodeMatchesShopSMS(Int32 iUserId, String strZipCode, Int32 iPrivateLabelId)
 {
     try
     {
         List <BodyShopZipCodeBL> lstBodyShopZipCode = BodyShopZipCodeBL.getDataByZipCode(strZipCode);
         if (lstBodyShopZipCode != null && lstBodyShopZipCode.Count > 0)
         {
             List <BodyShopPrivateLabelBL> lstBodyShopPrivateLabel = new List <BodyShopPrivateLabelBL>();
             if (iPrivateLabelId != 0)
             {
                 lstBodyShopPrivateLabel = BodyShopPrivateLabelBL.GetShopListByPrivateLabelId(iPrivateLabelId);
                 if (lstBodyShopPrivateLabel != null && lstBodyShopPrivateLabel.Count > 0)
                 {
                     lstBodyShopZipCode.RemoveAll(objBodyShopZipCode => lstBodyShopPrivateLabel.Exists(objBodyShopPrivateLabel => objBodyShopPrivateLabel.iShopID != objBodyShopZipCode.iShopId));
                 }
             }
             UserBL objUser = UserBL.getByActivityId(iUserId);
             foreach (BodyShopZipCodeBL objBodyShopZipCode in lstBodyShopZipCode)
             {
                 #region Opted-out Code
                 //Check that user has opted-out for send sms
                 if (objUser.bIsOptedOutForMobileMessage == true)
                 {
                     continue;
                 }
                 #endregion
                 CampaignBL objCampaign = CampaignBL.GetZipCodeMatchesMessageByShopId(objBodyShopZipCode.iShopId);
                 if (objCampaign != null && !String.IsNullOrEmpty(objCampaign.strMessage) && !String.IsNullOrEmpty(objUser.strPhone) && !String.IsNullOrEmpty(objCampaign.strMessage))
                 {
                     SMS    objSMS     = new SMS();
                     string strMessage = objCampaign.strMessage.Replace("[[ID]]", iUserId.ToString());
                     objSMS.SendSMS(objUser.strPhone, strMessage, objUser.ID, FromAppSection.NewRepairProspect, objBodyShopZipCode.iShopId);
                 }
             }
         }
     }
     catch (Exception)
     {
     }
 }
Exemplo n.º 2
0
    /// <summary>
    /// Initialization
    /// </summary>
    public override void _Ready()
    {
        campaignBL  = new CampaignBL();
        characterBL = new CharacterBL();
        level       = campaignBL.GetLevel(Global.WorldId, Global.SectionId, Global.LevelId);
        character   = characterBL.GetCharacter(Global.StudentId);
        //Child node instance
        var gamePlayScene = ResourceLoader.Load("res://Presentation/GamePlay/GamePlay.tscn") as PackedScene;

        gamePlay = gamePlayScene?.Instance() as GamePlay;
        AddChild(gamePlay);
        gamePlay.Connect("NoMoreQuestions", this, nameof(InsertStudentScore));
        SetSpritesPath();
        gamePlay.SetCharacter(character);
        gamePlay.SetQuestionList(level.Question);
        gamePlay.SetTimeLimit(level.TimeLimit);
        gamePlay.DisplayQuestion();
        gamePlay.SetQuestionNum();
        gamePlay.SetBg();
        gamePlay.LoadStart(character, level.Monster);
        gamePlay.SetGameType("Campaign");
    }
Exemplo n.º 3
0
 protected void DeleteLinkButton_Click(object sender, EventArgs e)
 {
     campaignID = Convert.ToInt64(Session["EditCampaignID"]);
     CampaignBL campaignBl = new CampaignBL();
     campaignBl.DeleteCampaignByID(campaignID);
     Session["EditCampaignID"] = 0;
     this.CampaignsGridView.DataBind();
     this.CampaignsGridView.SelectedIndex = -1;
     this.MiniCampaignFormView.DataBind();
     this.MiniMoreDetailsView.DataBind();
     CampaignListUpdatePanel.Update();
     MiniDetailsUpdatePanel.Update();
     CampaignRunLinkButton.Visible = false;
     EditLinkButton.Visible = false;
     DeleteLinkButton.Visible = false;
     CampaignTargetLinkButton.Visible = false;
 }