public int UpdateUserProfileGuest(UserProfileGuest theGuest) { try { int ReturnValue = 0; SqlCommand SqlCmd = new SqlCommand(); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.Add(GetParameter("ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output; SqlCmd.Parameters.Add(GetParameter("GuestID", SqlDbType.Int, theGuest.GuestID)); SqlCmd.Parameters.Add(GetParameter("Salutation", SqlDbType.VarChar, theGuest.Salutation)); SqlCmd.Parameters.Add(GetParameter("GuestName", SqlDbType.VarChar, theGuest.GuestName)); SqlCmd.Parameters.Add(GetParameter("Gender", SqlDbType.VarChar, theGuest.Gender)); SqlCmd.Parameters.Add(GetParameter("Age", SqlDbType.Int, theGuest.Age)); SqlCmd.Parameters.Add(GetParameter("Address_Present_TownOrCity", SqlDbType.VarChar, theGuest.Address_Present_TownOrCity)); SqlCmd.Parameters.Add(GetParameter("Address_Present_DistrictID", SqlDbType.Int, theGuest.Address_Present_DistrictID)); SqlCmd.Parameters.Add(GetParameter("PhoneNumber", SqlDbType.VarChar, theGuest.PhoneNumber)); SqlCmd.Parameters.Add(GetParameter("PersonalEMailID", SqlDbType.VarChar, theGuest.PersonalEMailID)); SqlCmd.Parameters.Add(GetParameter("ModifiedBy", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.UserID)); SqlCmd.CommandText = "pADM_UserProfile_Guest_Update"; ExecuteStoredProcedure(SqlCmd); ReturnValue = int.Parse(SqlCmd.Parameters[0].Value.ToString()); return(ReturnValue); } catch (Exception ex) { throw (new Exception(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + (new System.Diagnostics.StackFrame()).GetMethod().Name, ex)); } }
public int UpdateUserProfileGuest(UserProfileGuest theGuest) { try { return(UserProfileGuestIntegration.UpdateUserProfileGuest(theGuest)); } catch (Exception ex) { throw (new Exception(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + (new System.Diagnostics.StackFrame()).GetMethod().Name, ex)); } }
public int UpdateGuest(int guestid) { int ProcReturnValue = 0; UserProfileGuest TheGuest = new UserProfileGuest(); TheGuest.GuestID = Connection.LoggedOnUser.UserReferenceID; TheGuest.Salutation = ddl_GuestSalutation.SelectedValue; TheGuest.GuestName = txt_GuestName.Text; TheGuest.Gender = ddl_GuestGender.SelectedValue; TheGuest.Age = int.Parse(txt_GuestAge.Text); TheGuest.Address_Present_TownOrCity = txt_GuestPresentTownOrCity.Text; TheGuest.Address_Present_DistrictID = int.Parse(ddl_GuestPresentDistrict.SelectedValue); TheGuest.PhoneNumber = txt_GuestPhone.Text; TheGuest.PersonalEMailID = txt_GuestEmailId.Text; ProcReturnValue = UserProfileGuestManagement.GetInstance.UpdateUserProfileGuest(TheGuest); return(ProcReturnValue); }