Ejemplo n.º 1
0
        protected void btnSaveChanges_Click(object sender, EventArgs e)
        {
            try
            {
                using (AdGiverRT receiverTransfer = new AdGiverRT())
                {
                    string  userEmailId    = Convert.ToString(Session["UserName"]);
                    AdGiver adgiverEmailId = receiverTransfer.GetAdGiverIDByEmail(userEmailId);

                    if (adgiverEmailId != null)
                    {
                        AdGiver adGiverNamePhn = CreateadGiverNamePhn();
                        receiverTransfer.UpdateadGiverAccNamePhn(userEmailId, adGiverNamePhn.Name, adGiverNamePhn.PhoneNo1);
                        lblAccountdetails.Text      = "Name and Phone No. successfully updated...";
                        lblAccountdetails.ForeColor = System.Drawing.Color.Green;
                    }
                    else
                    {
                        lblAccountdetails.Text      = "Name and Phone No. not updated...";
                        lblAccountdetails.ForeColor = System.Drawing.Color.Red;
                    }
                }
            }
            catch (Exception ex)
            {
                lblAccountdetails.Text      = "Error : " + ex.Message;
                lblAccountdetails.ForeColor = System.Drawing.Color.Red;
            }
            //clearfield();
            showUserNamePhn();
        }