protected void btnUserProfile_Click(object sender, EventArgs e) { BLL.UserProfileBll bll = new BLL.UserProfileBll(); UserProfile oUserProfile = new UserProfile(); oUserProfile.Id = Convert.ToInt32(Request.QueryString["pId"]); oUserProfile.Name = txtName.Text; oUserProfile.FatherName = txtFatherName.Text; oUserProfile.Address = txtAddress.Text; oUserProfile.PhoneNo = txtMobileNo.Text; oUserProfile.Gender = Convert.ToInt32(rdBtnGender.SelectedValue); oUserProfile.BirthDate = txtBirthDate.Text; bool isSuccess = bll.UserInfoUpdate(oUserProfile); if (isSuccess) { lblShowMsg.ForeColor = System.Drawing.Color.Green; lblShowMsg.Text = "Successfully Updated"; } else { lblShowMsg.ForeColor = System.Drawing.Color.Red; lblShowMsg.Text = "Infomation Not Updated"; } }
/******** Getting User Information ======> *****/ private void LoadUserProfile(string appointIdQS, string userIdQS) { BLL.UserProfileBll bll = new BLL.UserProfileBll(); //PatientAppointment oPatientAppointment = new PatientAppointment(); //oPatientAppointment.Id = Convert.ToInt32(appointIdQS); //oPatientAppointment.DoctorUserId = Convert.ToInt32(DdlDocName.SelectedItem.Value); DataTable userInfoDt = bll.GetUserInfo(appointIdQS, userIdQS); if (userInfoDt.Rows.Count > 0) { txtName.Text = userInfoDt.Rows[0]["name"].ToString(); txtFatherName.Text = userInfoDt.Rows[0]["father_name"].ToString(); txtMobileNo.Text = userInfoDt.Rows[0]["cell_phone"].ToString(); txtBirthDate.Text = userInfoDt.Rows[0]["birth_date"].ToString(); txtAddress.Text = userInfoDt.Rows[0]["address"].ToString(); rdBtnGender.Text = userInfoDt.Rows[0]["gender"].ToString(); } }