示例#1
0
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            if (Session["RegId"] != null && Session["RegId"] != "")
            {
                EntityServiceReference.EntityServiceClient ServiceClient = new EntityServiceReference.EntityServiceClient();
                ServiceClient.Open();
                DateTime dtdoa;
                String   Dob   = ddlmonth.SelectedValue.ToString() + "/" + ddlday.SelectedValue.ToString() + "/" + ddlyear.SelectedValue.ToString();
                String   Doa   = DdlDayAnniversary.SelectedValue.ToString() + "/" + DdlMonthAnniversary.SelectedValue.ToString() + "/" + DdlYearAnniversary.SelectedValue.ToString();
                DateTime dtdob = Convert.ToDateTime(Dob);
                if (RdMartialStatus.SelectedValue.ToString().Equals("Married"))
                {
                    dtdoa = Convert.ToDateTime(Doa);
                }
                else
                {
                    dtdoa = System.DateTime.Now;
                }

                int Confirm = ServiceClient.UpdateUserDetails(Session["RegId"].ToString(), RdGender.SelectedItem.Text.ToString(), txtFirstName.Text.ToString(), txtLastName.Text.ToString(), txtAddress.Text.ToString(), "", txtCity.Text.ToString(), DdlCountry.SelectedItem.Text.ToString(), txtMobileNo.Text.ToString(), TxtEmail.Text.ToString(), dtdob, dtdoa, RdMartialStatus.SelectedValue.ToString(), txtDesignation.Text.ToString(), txtMobileNo.Text.ToString());
                if (Confirm == 1)
                {
                    LblMsg.Text = "Record Updated";
                    HTMLSignUpMailer(Session["RegId"].ToString());
                }
                ServiceClient.Close();
            }
        }
示例#2
0
 protected void BtnSubmit_Click(object sender, EventArgs e)
 {
    
     if (Session["RegId"] != null && Session["RegId"] != "")
     {
         
        
         EntityServiceReference.EntityServiceClient ServiceClient = new EntityServiceReference.EntityServiceClient();
         ServiceClient.Open();
         DateTime dtdoa;
         String Dob = ddlmonth.SelectedValue.ToString() + "/" + ddlday.SelectedValue.ToString() + "/" + ddlyear.SelectedValue.ToString();
         String Doa = DdlDayAnniversary.SelectedValue.ToString() + "/" + DdlMonthAnniversary.SelectedValue.ToString() + "/" + DdlYearAnniversary.SelectedValue.ToString();
         DateTime dtdob = Convert.ToDateTime(Dob);
         if (RdMartialStatus.SelectedValue.ToString().Equals("Married"))
         {
              dtdoa = Convert.ToDateTime(Doa);
         }
         else
         {
              dtdoa =System.DateTime.Now;
         }
        
         int Confirm = ServiceClient.UpdateUserDetails(Session["RegId"].ToString(), RdGender.SelectedItem.Text.ToString(), txtFirstName.Text.ToString(), txtLastName.Text.ToString(), txtAddress.Text.ToString(), "", txtCity.Text.ToString(), DdlCountry.SelectedItem.Text.ToString(), txtMobileNo.Text.ToString(), TxtEmail.Text.ToString(), dtdob, dtdoa, RdMartialStatus.SelectedValue.ToString(), txtDesignation.Text.ToString(), txtMobileNo.Text.ToString());
         if (Confirm == 1)
         {
             LblMsg.Text = "Record Updated";
             HTMLSignUpMailer(Session["RegId"].ToString());
         
         }
         ServiceClient.Close();
       
     }
    
 }