protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                EntityServiceReference.EntityServiceClient ServiceRefClient = new EntityServiceReference.EntityServiceClient();
                ServiceRefClient.Open();

                if (Session["RegId"] != null && Session["RegId"] != "")
                {
                    int cnfrm = ServiceRefClient.ChangePassword(LblMembershipId.Text.ToString(), txtOldPassword.Text.ToString(), txtNewPassword.Text.ToString());
                    if (cnfrm == 1)
                    {
                        LblMsg.Text = "Password Changed";
                        EntityServiceReference.EntityServiceClient ServiceRefClient2 = new EntityServiceReference.EntityServiceClient();
                        ServiceRefClient2.Open();
                        var arr = ServiceRefClient2.GetUserDetails(Session["RegId"].ToString());
                        if (arr.Length > 0)
                        {
                            HTMLMailer(arr[0].Email.ToString(), txtNewPassword.Text.ToString(), Session["RegId"].ToString());
                        }
                        ServiceRefClient2.Close();
                    }
                    else
                    {
                        LblMsg.Text = "Entered Password Is Wrong";
                    }
                }
                ServiceRefClient.Close();
            }
            catch (Exception ex)
            {
                LblMsg.Text = ex.Message;
            }
        }
        protected void BtnBookTickets_Click(object sender, EventArgs e)
        {
            EntityServiceReference.EntityServiceClient ServiceRefClient = new EntityServiceReference.EntityServiceClient();
            ServiceRefClient.Open();
            var    arr       = ServiceRefClient.GetUserDetails(Session["RegId"].ToString());
            String FirstName = arr[0].FirstName.ToString();
            String LastName  = arr[0].LastName.ToString();
            String EmailID   = arr[0].Email.ToString();
            String MobileNo  = arr[0].Mobile.ToString();
            String Address   = arr[0].Address.ToString();
            String Address2  = arr[0].Address2.ToString();

            ServiceRefClient.Close();

            //Response.Redirect(ConfigurationManager.AppSettings.Get("MsTicketURL").ToString() + "?RemainingAmount=" + Server.UrlEncode(Encrypt(lblavailableVal.Text)) + "&RemainingPoints=" + Server.UrlEncode(Encrypt(lblAvailablePoints.Text)) + "&MemberShipId=" + Server.UrlEncode(Encrypt(Session["RegId"].ToString())) + "&FirstName=" + Server.UrlEncode(Encrypt(FirstName)) + "&LastName=" + Server.UrlEncode(Encrypt(LastName))+"&Email="+Server.UrlEncode(Encrypt(EmailID))+"&Mobile="+Server.UrlEncode(Encrypt(MobileNo))+"&Address="+Server.UrlEncode(Encrypt(Address)));
            string password = "******";
            string ss       = Common.Encrypt(lblAvailablePoints.Text, password);
            string ss1      = Common.Encrypt(FirstName, password);
            string ss2      = Common.Encrypt(LastName, password);
            string url      = ConfigurationManager.AppSettings.Get("MsTicketURL").ToString() + "?RemainingAmount=" + Server.UrlEncode(Common.Encrypt(lblavailableVal.Text, password))
                              + "&RemainingPoints=" + Server.UrlEncode(Common.Encrypt(lblAvailablePoints.Text, password)) + "&MemberShipId=" +
                              Server.UrlEncode(Common.Encrypt(Session["RegId"].ToString(), password)) + "&FirstName=" + Server.UrlEncode(Common.Encrypt(FirstName, password))
                              + "&LastName=" + Server.UrlEncode(Common.Encrypt(LastName, password)) + "&Email="
                              + Server.UrlEncode(Common.Encrypt(EmailID, password)) + "&Mobile=" + Server.UrlEncode(Common.Encrypt(MobileNo, password)) +
                              "&Address=" + Server.UrlEncode(Common.Encrypt(Address, password));

            Response.Redirect(url);

            //+"&Address2="+Server.UrlEncode(Encrypt(Address2))
        }
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                EntityServiceReference.EntityServiceClient ServiceRefClient = new EntityServiceReference.EntityServiceClient();
                ServiceRefClient.Open();

                if (Session["RegId"] != null && Session["RegId"] != "")
                {

                    int cnfrm = ServiceRefClient.ChangePassword(LblMembershipId.Text.ToString(), txtOldPassword.Text.ToString(), txtNewPassword.Text.ToString());
                    if (cnfrm == 1)
                    {
                        LblMsg.Text = "Password Changed";
                          EntityServiceReference.EntityServiceClient ServiceRefClient2 = new EntityServiceReference.EntityServiceClient();
                          ServiceRefClient2.Open();
                        var arr=ServiceRefClient2.GetUserDetails(Session["RegId"].ToString());
                        if(arr.Length>0)
                        {
                        HTMLMailer(arr[0].Email.ToString(),txtNewPassword.Text.ToString(), Session["RegId"].ToString());
                        }
                        ServiceRefClient2.Close();
                    }
                    else
                    {
                        LblMsg.Text = "Entered Password Is Wrong";
                    }
                }
                ServiceRefClient.Close();            
              }
            catch (Exception ex)
            {
             LblMsg.Text= ex.Message;
            }
        }
        void BindData()
        {
            EntityServiceReference.EntityServiceClient ServiceClient = new EntityServiceReference.EntityServiceClient();
            ServiceClient.Open();
            if (Session["RegId"] != null && Session["RegId"] != "")
            {
                var arr = ServiceClient.GetUserDetails(Session["RegId"].ToString());
                if (arr.Length > 0)
                {
                    txtFirstName.Text = arr[0].FirstName.ToString();
                    txtLastName.Text = arr[0].LastName.ToString();
                    txtCity.Text = arr[0].City.ToString();

                    txtAddress.Text = arr[0].Address.ToString();
                    txtMobileNo.Text = arr[0].Mobile.ToString();
                    if (!arr[0].DOB.ToString().Equals(""))
                    {
                        String[] arrDob = new String[arr[0].DOB.Length];
                        arrDob = arr[0].DOB.ToString().Split('/');
                        ddlday.SelectedValue = arrDob[0].ToString();
                        ddlmonth.SelectedValue = arrDob[1].ToString();
                        ddlyear.SelectedValue = arrDob[2].ToString();
                    }
                    if (!arr[0].AnniversaryDate.ToString().Equals(""))
                    {

                        String[] arrAnn = new String[arr[0].AnniversaryDate.Length];
                        arrAnn = arr[0].AnniversaryDate.ToString().Split('/');
                        DdlDayAnniversary.SelectedValue = arrAnn[0].ToString();
                        DdlMonthAnniversary.SelectedValue = arrAnn[1].ToString();
                        DdlYearAnniversary.SelectedValue = arrAnn[2].ToString();
                    }
                    txtDesignation.Text = arr[0].Designation.ToString();
                    TxtEmail.Text= arr[0].Email.ToString();
                    DdlCountry.SelectedItem.Text = arr[0].County.ToString();
                    RdMartialStatus.SelectedValue = arr[0].MaritalStatus.ToString();
                    RdGender.SelectedValue = arr[0].Salutation.ToString();
                    if (RdMartialStatus.SelectedValue.ToString().Equals("Married"))
                    {
                        trAnn.Visible = true;
                    }
                    else
                    {
                        trAnn.Visible = false;
                    }
                }
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["IsLogged"] != null && Session["IsLogged"] != "")
     {
         EntityServiceReference.EntityServiceClient ServiceRefClient = new EntityServiceReference.EntityServiceClient();
         ServiceRefClient.Open();
         var arr = ServiceRefClient.GetUserDetails(Session["RegId"].ToString());
        
         LblUserName.Text = "Welcome " + arr[0].FirstName.ToString() + " " + arr[0].LastName.ToString() + " [<a href='Logout.aspx'>Sign Out</a> ]";
         ServiceRefClient.Close();
     }
     else
     {
       LblUserName.Text = "";
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["IsLogged"] != null && Session["IsLogged"] != "")
            {
                EntityServiceReference.EntityServiceClient ServiceRefClient = new EntityServiceReference.EntityServiceClient();
                ServiceRefClient.Open();
                var arr = ServiceRefClient.GetUserDetails(Session["RegId"].ToString());

                LblUserName.Text = "Welcome " + arr[0].FirstName.ToString() + " " + arr[0].LastName.ToString() + " [<a href='Logout.aspx'>Sign Out</a> ]";
                ServiceRefClient.Close();
            }
            else
            {
                LblUserName.Text = "";
            }
        }
        void BindData()
        {
            EntityServiceReference.EntityServiceClient ServiceClient = new EntityServiceReference.EntityServiceClient();
            ServiceClient.Open();
            if (Session["RegId"] != null && Session["RegId"] != "")
            {
                var arr = ServiceClient.GetUserDetails(Session["RegId"].ToString());
                if (arr.Length > 0)
                {
                    txtFirstName.Text = arr[0].FirstName.ToString();
                    txtLastName.Text  = arr[0].LastName.ToString();
                    txtCity.Text      = arr[0].City.ToString();

                    txtAddress.Text  = arr[0].Address.ToString();
                    txtMobileNo.Text = arr[0].Mobile.ToString();
                    if (!arr[0].DOB.ToString().Equals(""))
                    {
                        String[] arrDob = new String[arr[0].DOB.Length];
                        arrDob = arr[0].DOB.ToString().Split('/');
                        ddlday.SelectedValue   = arrDob[0].ToString();
                        ddlmonth.SelectedValue = arrDob[1].ToString();
                        ddlyear.SelectedValue  = arrDob[2].ToString();
                    }
                    if (!arr[0].AnniversaryDate.ToString().Equals(""))
                    {
                        String[] arrAnn = new String[arr[0].AnniversaryDate.Length];
                        arrAnn = arr[0].AnniversaryDate.ToString().Split('/');
                        DdlDayAnniversary.SelectedValue   = arrAnn[0].ToString();
                        DdlMonthAnniversary.SelectedValue = arrAnn[1].ToString();
                        DdlYearAnniversary.SelectedValue  = arrAnn[2].ToString();
                    }
                    txtDesignation.Text           = arr[0].Designation.ToString();
                    TxtEmail.Text                 = arr[0].Email.ToString();
                    DdlCountry.SelectedItem.Text  = arr[0].County.ToString();
                    RdMartialStatus.SelectedValue = arr[0].MaritalStatus.ToString();
                    RdGender.SelectedValue        = arr[0].Salutation.ToString();
                    if (RdMartialStatus.SelectedValue.ToString().Equals("Married"))
                    {
                        trAnn.Visible = true;
                    }
                    else
                    {
                        trAnn.Visible = false;
                    }
                }
            }
        }
 void BindData()
 {
     EntityServiceReference.EntityServiceClient ServiceClient = new EntityServiceReference.EntityServiceClient();
     ServiceClient.Open();
     if (Session["RegId"] != null && Session["RegId"] != "")
     {
         var arr = ServiceClient.GetUserDetails(Session["RegId"].ToString());
         if (arr.Length > 0)
         {
             LblMemberId.Text = arr[0].MemberID.ToString();
             LblName.Text = arr[0].FirstName.ToString() + " " + arr[0].LastName.ToString();
             LblAddress.Text = arr[0].Address.ToString();
             LblMobileNo.Text = arr[0].Mobile.ToString();
             LblDob.Text = arr[0].DOB.ToString();
             LblAnniversary.Text = arr[0].AnniversaryDate.ToString();
             LblDesignation.Text = arr[0].Designation.ToString();
             LblEmailId.Text = arr[0].Email.ToString();
             LblStatus.Text = arr[0].MaritalStatus.ToString();
         }
     }         
 }
 void BindData()
 {
     EntityServiceReference.EntityServiceClient ServiceClient = new EntityServiceReference.EntityServiceClient();
     ServiceClient.Open();
     if (Session["RegId"] != null && Session["RegId"] != "")
     {
         var arr = ServiceClient.GetUserDetails(Session["RegId"].ToString());
         if (arr.Length > 0)
         {
             LblMemberId.Text    = arr[0].MemberID.ToString();
             LblName.Text        = arr[0].FirstName.ToString() + " " + arr[0].LastName.ToString();
             LblAddress.Text     = arr[0].Address.ToString();
             LblMobileNo.Text    = arr[0].Mobile.ToString();
             LblDob.Text         = arr[0].DOB.ToString();
             LblAnniversary.Text = arr[0].AnniversaryDate.ToString();
             LblDesignation.Text = arr[0].Designation.ToString();
             LblEmailId.Text     = arr[0].Email.ToString();
             LblStatus.Text      = arr[0].MaritalStatus.ToString();
         }
     }
 }
Exemple #10
0
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            bool istrue = Regex.IsMatch(txtmobile.Text.ToString(), "^[0-9]{10}$");
            bool isEmailcorrect = Regex.IsMatch(txtEmail.Text.ToString(), "^([0-9a-zA-Z]+([_.-]?[0-9a-zA-Z]+)*@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-][.]{1}[a-zA-Z]{2,4})+$");
            if (txtFirstName.Text == "" || txtFirstName.Text.ToString() == null)
            {
                ClientScript.RegisterStartupScript(typeof(Page), "test", "alert('Please Enter Your Name');", true);
                txtFirstName.Focus();
            }
            else if (txtEmail.Text == "" || txtEmail.Text.ToString() == null)
	        {
                ClientScript.RegisterStartupScript(typeof(Page), "test", "alert('Please Enter Your Email ID');", true);
                txtEmail.Focus();
	        }
            else if (isEmailcorrect == false)
            {
                ClientScript.RegisterStartupScript(typeof(Page), "test", "alert('Please Enter valid Email ID');", true);
                txtEmail.Focus();
            }
            else if (txtmobile.Text == "" || txtmobile.Text.ToString() == null)
            {
                ClientScript.RegisterStartupScript(typeof(Page), "test", "alert('Please Enter Your Mobile No.');", true);
                txtmobile.Focus();
            }
            else if (istrue==false)
            {
                 ClientScript.RegisterStartupScript(typeof(Page), "test", "alert('Please Enter valid Mobile No.');", true);
                txtmobile.Focus();
            }
            else if (rdYes.Checked&&(txtMembership.Text==""||txtMembership.Text.ToString()==null))
            {
                    ClientScript.RegisterStartupScript(typeof(Page), "test", "alert('Please Enter valid Membership ID');", true);
                    txtMembership.Focus();
                    txtMembership.Enabled = true;
            }
            else if (txtComments.Text == "" || txtComments.Text.ToString() == null)
            {
                ClientScript.RegisterStartupScript(typeof(Page), "test", "alert('Please Enter Your Comments');", true);
                txtComments.Focus();
            }
            else
            {
                Inquiryfrm.Visible = false;
                if (Session["RegId"] != null && Session["RegId"].ToString() != "")
                {
                    EntityServiceReference.EntityServiceClient ServiceClient = new EntityServiceReference.EntityServiceClient();
                    ServiceClient.Open();
                    var arr = ServiceClient.GetUserDetails(Session["RegId"].ToString());
                    if (arr.Length > 0)
                    {
                        String username = arr[0].FirstName.ToString() + " " + arr[0].LastName.ToString();
                        MailToAdmin(arr[0].Email.ToString());
                        MailToUser(arr[0].Email.ToString(), username.ToString());
                        Lblmsg.Visible = true;
                        Lblmsg.Text = "Thanks for your kind Feedback";
                        txtComments.Text = "";
                        BtnSubmit.Enabled = false;
                        ServiceClient.Close();
                    }
                }

                else
                {
                    Session["RegId"] = "";
                    MailToAdmin(txtEmail.Text.ToString());
                    MailToUser(txtEmail.Text.ToString(), txtFirstName.Text.ToString());
                    Lblmsg.Visible = true;
                    Lblmsg.Text = "Thanks for your kind Feedback";
                }
            }
        }
Exemple #11
0
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            bool istrue         = Regex.IsMatch(txtmobile.Text.ToString(), "^[0-9]{10}$");
            bool isEmailcorrect = Regex.IsMatch(txtEmail.Text.ToString(), "^([0-9a-zA-Z]+([_.-]?[0-9a-zA-Z]+)*@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-][.]{1}[a-zA-Z]{2,4})+$");

            if (txtFirstName.Text == "" || txtFirstName.Text.ToString() == null)
            {
                ClientScript.RegisterStartupScript(typeof(Page), "test", "alert('Please Enter Your Name');", true);
                txtFirstName.Focus();
            }
            else if (txtEmail.Text == "" || txtEmail.Text.ToString() == null)
            {
                ClientScript.RegisterStartupScript(typeof(Page), "test", "alert('Please Enter Your Email ID');", true);
                txtEmail.Focus();
            }
            else if (isEmailcorrect == false)
            {
                ClientScript.RegisterStartupScript(typeof(Page), "test", "alert('Please Enter valid Email ID');", true);
                txtEmail.Focus();
            }
            else if (txtmobile.Text == "" || txtmobile.Text.ToString() == null)
            {
                ClientScript.RegisterStartupScript(typeof(Page), "test", "alert('Please Enter Your Mobile No.');", true);
                txtmobile.Focus();
            }
            else if (istrue == false)
            {
                ClientScript.RegisterStartupScript(typeof(Page), "test", "alert('Please Enter valid Mobile No.');", true);
                txtmobile.Focus();
            }
            else if (rdYes.Checked && (txtMembership.Text == "" || txtMembership.Text.ToString() == null))
            {
                ClientScript.RegisterStartupScript(typeof(Page), "test", "alert('Please Enter valid Membership ID');", true);
                txtMembership.Focus();
                txtMembership.Enabled = true;
            }
            else if (txtComments.Text == "" || txtComments.Text.ToString() == null)
            {
                ClientScript.RegisterStartupScript(typeof(Page), "test", "alert('Please Enter Your Comments');", true);
                txtComments.Focus();
            }
            else
            {
                Inquiryfrm.Visible = false;
                if (Session["RegId"] != null && Session["RegId"].ToString() != "")
                {
                    EntityServiceReference.EntityServiceClient ServiceClient = new EntityServiceReference.EntityServiceClient();
                    ServiceClient.Open();
                    var arr = ServiceClient.GetUserDetails(Session["RegId"].ToString());
                    if (arr.Length > 0)
                    {
                        String username = arr[0].FirstName.ToString() + " " + arr[0].LastName.ToString();
                        MailToAdmin(arr[0].Email.ToString());
                        MailToUser(arr[0].Email.ToString(), username.ToString());
                        Lblmsg.Visible    = true;
                        Lblmsg.Text       = "Thanks for your kind Feedback";
                        txtComments.Text  = "";
                        BtnSubmit.Enabled = false;
                        ServiceClient.Close();
                    }
                }

                else
                {
                    Session["RegId"] = "";
                    MailToAdmin(txtEmail.Text.ToString());
                    MailToUser(txtEmail.Text.ToString(), txtFirstName.Text.ToString());
                    Lblmsg.Visible = true;
                    Lblmsg.Text    = "Thanks for your kind Feedback";
                }
            }
        }
Exemple #12
0
 void BindData()
 {
     if (Session["RegId"] != null && Session["RegId"] != "")
     {
         EntityServiceReference.EntityServiceClient ServiceClient1 = new EntityServiceReference.EntityServiceClient();
         ServiceClient1.Open();
         // get card details by m id
         var    dbreturns = ServiceClient1.GetUserDetails(Session["RegId"].ToString());
         String Name      = dbreturns[0].FirstName.ToString();
         lblName.Text     = Name;
         lblMemberID.Text = dbreturns[0].MemberID.ToString();
         lblDate.Text     = dbreturns[0].DateonCard.ToString();
         if (dbreturns.Length > 0)
         {
             String CardType = dbreturns[0].CardCode.ToString();
             // get card details by card type
             EntityServiceReference.EntityServiceClient ServiceClient = new EntityServiceReference.EntityServiceClient();
             ServiceClient.Open();
             var arr = ServiceClient.GetCardsDetailsbyType(CardType);
             GridCardList.DataSource = arr;
             GridCardList.DataBind();
             ServiceClient.Close();
             if (CardType.ToString().ToUpper().Equals("BLUE"))
             {
                 ImgCard.ImageUrl = "../Skins/images/blueCard.png";
             }
             else if (CardType.ToString().ToUpper().Equals("GOLD"))
             {
                 ImgCard.ImageUrl = "../Skins/images/goldCard.png";
             }
             else if (CardType.ToString().ToUpper().Equals("PLATINUM"))
             {
                 ImgCard.ImageUrl = "../Skins/images/platinumCard.png";
             }
             else if (CardType.ToString().ToUpper().Equals("PURPLE"))
             {
                 ImgCard.ImageUrl = "../Skins/images/purpleCard.png";
             }
             else if (CardType.ToString().ToUpper().Equals("TITANIUM"))
             {
                 ImgCard.ImageUrl = "../Skins/images/titaniumCard.png";
             }
             else if (CardType.ToString().ToUpper().Equals("PRINCE"))
             {
                 ImgCard.ImageUrl = "../Skins/images/princeCard.png";
             }
             else if (CardType.ToString().ToUpper().Equals("KING"))
             {
                 ImgCard.ImageUrl = "../Skins/images/kingCard.png";
             }
         }
         EntityServiceReference.EntityServiceClient ServiceClient2 = new EntityServiceReference.EntityServiceClient();
         ServiceClient2.Open();
         var    CardDetails     = ServiceClient2.GetCardsBalanceByMemberId(Session["RegId"].ToString());
         String RemainingAmount = CardDetails[0].RemainingAmount.ToString();
         lblavailableVal.Text = RemainingAmount;
         String RemainingPoints = CardDetails[0].RemainingPoints.ToString();
         lblAvailablePoints.Text = RemainingPoints;
         String After24Hrs = CardDetails[0].After24HourPoints.ToString();
         lblAfter24hrs.Text = After24Hrs;
         String RechargeAmount = CardDetails[0].RechargeAmount.ToString();
         lblTotalRedemption.Text = RechargeAmount;
         ServiceClient1.Close();
         ServiceClient2.Close();
     }
 }
Exemple #13
0
        protected void BtnBookTickets_Click(object sender, EventArgs e)
        {
            EntityServiceReference.EntityServiceClient ServiceRefClient = new EntityServiceReference.EntityServiceClient();
            ServiceRefClient.Open();
            var arr = ServiceRefClient.GetUserDetails(Session["RegId"].ToString());
            String FirstName = arr[0].FirstName.ToString();
            String LastName = arr[0].LastName.ToString();
            String EmailID = arr[0].Email.ToString();
            String MobileNo = arr[0].Mobile.ToString();
            String Address = arr[0].Address.ToString();
            String Address2 = arr[0].Address2.ToString();
            ServiceRefClient.Close();

            //Response.Redirect(ConfigurationManager.AppSettings.Get("MsTicketURL").ToString() + "?RemainingAmount=" + Server.UrlEncode(Encrypt(lblavailableVal.Text)) + "&RemainingPoints=" + Server.UrlEncode(Encrypt(lblAvailablePoints.Text)) + "&MemberShipId=" + Server.UrlEncode(Encrypt(Session["RegId"].ToString())) + "&FirstName=" + Server.UrlEncode(Encrypt(FirstName)) + "&LastName=" + Server.UrlEncode(Encrypt(LastName))+"&Email="+Server.UrlEncode(Encrypt(EmailID))+"&Mobile="+Server.UrlEncode(Encrypt(MobileNo))+"&Address="+Server.UrlEncode(Encrypt(Address)));
            string password = "******";
            string ss = Common.Encrypt(lblAvailablePoints.Text, password);
            string ss1 = Common.Encrypt(FirstName, password);
            string ss2 = Common.Encrypt(LastName, password);
            string url = ConfigurationManager.AppSettings.Get("MsTicketURL").ToString() + "?RemainingAmount=" + Server.UrlEncode(Common.Encrypt(lblavailableVal.Text, password))
                + "&RemainingPoints=" + Server.UrlEncode(Common.Encrypt(lblAvailablePoints.Text, password)) + "&MemberShipId=" +
                Server.UrlEncode(Common.Encrypt(Session["RegId"].ToString(), password)) + "&FirstName=" + Server.UrlEncode(Common.Encrypt(FirstName, password))
                + "&LastName=" + Server.UrlEncode(Common.Encrypt(LastName, password)) + "&Email="
                + Server.UrlEncode(Common.Encrypt(EmailID, password)) + "&Mobile=" + Server.UrlEncode(Common.Encrypt(MobileNo, password)) +
                "&Address=" + Server.UrlEncode(Common.Encrypt(Address, password));

            Response.Redirect(url);

            //+"&Address2="+Server.UrlEncode(Encrypt(Address2))
        }
Exemple #14
0
        void BindData()
        {
            if (Session["RegId"] != null && Session["RegId"] != "")
            {
                EntityServiceReference.EntityServiceClient ServiceClient1 = new EntityServiceReference.EntityServiceClient();
                ServiceClient1.Open();
                // get card details by m id
                var dbreturns = ServiceClient1.GetUserDetails(Session["RegId"].ToString());
                String Name = dbreturns[0].FirstName.ToString();
                lblName.Text = Name;
                lblMemberID.Text = dbreturns[0].MemberID.ToString();
                lblDate.Text = dbreturns[0].DateonCard.ToString();
                if (dbreturns.Length > 0)
                {
                    String CardType = dbreturns[0].CardCode.ToString();
                    // get card details by card type
                    EntityServiceReference.EntityServiceClient ServiceClient = new EntityServiceReference.EntityServiceClient();
                    ServiceClient.Open();
                    var arr = ServiceClient.GetCardsDetailsbyType(CardType);
                    GridCardList.DataSource = arr;
                    GridCardList.DataBind();
                    ServiceClient.Close();
                    if (CardType.ToString().ToUpper().Equals("BLUE"))
                    {
                        ImgCard.ImageUrl = "../Skins/images/blueCard.png";
                    }
                    else if (CardType.ToString().ToUpper().Equals("GOLD"))
                    {
                        ImgCard.ImageUrl = "../Skins/images/goldCard.png";
                    }
                    else if (CardType.ToString().ToUpper().Equals("PLATINUM"))
                    {
                        ImgCard.ImageUrl = "../Skins/images/platinumCard.png";
                    }
                    else if (CardType.ToString().ToUpper().Equals("PURPLE"))
                    {
                        ImgCard.ImageUrl = "../Skins/images/purpleCard.png";
                    }
                    else if (CardType.ToString().ToUpper().Equals("TITANIUM"))
                    {
                        ImgCard.ImageUrl = "../Skins/images/titaniumCard.png";
                    }
                    else if (CardType.ToString().ToUpper().Equals("PRINCE"))
                    {
                        ImgCard.ImageUrl = "../Skins/images/princeCard.png";
                    }
                    else if (CardType.ToString().ToUpper().Equals("KING"))
                    {
                        ImgCard.ImageUrl = "../Skins/images/kingCard.png";
                    }
                }
                EntityServiceReference.EntityServiceClient ServiceClient2 = new EntityServiceReference.EntityServiceClient();
                ServiceClient2.Open();
                var CardDetails = ServiceClient2.GetCardsBalanceByMemberId(Session["RegId"].ToString());
                String RemainingAmount = CardDetails[0].RemainingAmount.ToString();
                lblavailableVal.Text = RemainingAmount;
                String RemainingPoints = CardDetails[0].RemainingPoints.ToString();
                lblAvailablePoints.Text = RemainingPoints;
                String After24Hrs = CardDetails[0].After24HourPoints.ToString();
                lblAfter24hrs.Text = After24Hrs;
                String RechargeAmount = CardDetails[0].RechargeAmount.ToString();
                lblTotalRedemption.Text = RechargeAmount;
                ServiceClient1.Close();
                ServiceClient2.Close();

            }
        }