SetUserMailFax

Changes user's Fax number and Mail Id for the user whose index is passed as an input parameter.

 

Public Function SetUserMailFax(ByVal userId As Long, ByVal MailId As String, ByVal Fax As String) As Long

Parameters

In/out

Name

Data type

Description

In

 

UserId

Long

Index of the user for which Fax/MailId is being set

In

 

MailId

String

Mail ID of the user

In

 

Fax

String

Fax number of the user

 

Description

This function is called through Admin when a Fax number or Mail Id is changed for an existing user ( included is the case when fax/mailId is entered for the first time for an existing user) or when Fax/ MailID is entered while creating a new user. An empty string is passed when any of the two is not being set. It first compares these values with the values already stored in userTags ( txtUser.Tag),if they are not same this call is made to set the values.

 

Return value

Name

Description

1

In case of success

-1

Invalid cabinet name

-3

Cabinet not connected

-201

Insufficient rights for the current operation

-131

Invalid user Id

-133

User not logged in

 

Example

   

    Dim userId             As   Long

   Dim MailId              As   String

   Dim Fax                 As   String

   Dim lRetVal            As   Long

  Dim gPdb               As    Pandb.Pdbcls

   set gPdb = new Pandb.PdbCls

   userId = 27                                ' userId

   MailId  =”sanjeev@yahoo.com”  

  Fax   = “543466578”

  lRetVal =  gPdb.SetUserMailFax(udtUserProps.UserId, MailId, Fax)

           

  If lRetVal <> 1 Then

        MsgBox gPdb.ErrDescription,vbinformation

  Else

        MsgBox "Success",Vbinformation

 End If