536 lines
22 KiB
ObjectPascal
536 lines
22 KiB
ObjectPascal
unit uDataModuleUsuarios;
|
|
|
|
interface
|
|
|
|
uses
|
|
SysUtils, Classes, DB, DBClient, uDADataTable,
|
|
FactuGES_Intf, uIntegerListUtils, uBizEmpresas,
|
|
UCBase, UCDataConnector, uUCROConn, uDARemoteDataAdapter,
|
|
uDARemoteCommand, uROClient, uRORemoteService, uDADataStreamer,
|
|
uDABin2DataStreamer, uDAScriptingProvider, uIDataModuleUsuarios, UCSettings;
|
|
|
|
const
|
|
PERFIL_ADMINISTRADORES = 'Administradores';
|
|
|
|
type
|
|
TDataModuleUsuarios = class(TDataModule, IDataModuleUsuarios)
|
|
ROLoginService: TRORemoteService;
|
|
srvUsuarios: TRORemoteService;
|
|
Bin2DataStreamer: TDABin2DataStreamer;
|
|
UCSettingsSpanish: TUCSettings;
|
|
procedure DAClientDataModuleCreate(Sender: TObject);
|
|
procedure DAClientDataModuleDestroy(Sender: TObject);
|
|
private
|
|
FDataConnector : TUCROConn;
|
|
FUsuario : String;
|
|
FPassword : String; // Lo guardo para poder hacer una reconexión
|
|
|
|
FLoginInfo: TRdxLoginInfo;
|
|
// function GetEsAdministrador: Boolean;
|
|
|
|
//function GetEmpresas: TIntegerList;
|
|
|
|
{procedure SetEmpresaActual(const Value: IBizEmpresa);
|
|
function GetIDEmpresaActual: Integer;
|
|
procedure SetIDEmpresaActual(const Value: Integer);}
|
|
function GetDataConnector : TUCDataConnector;
|
|
function GetUCSettings : TUCSettings;
|
|
procedure InicializarCamposUserControl(AUserControl: TUserControl);
|
|
procedure InicializarSettingsUserControl(AUserControl: TUserControl);
|
|
public
|
|
procedure InicializarUserControl (AUserControl : TUserControl);
|
|
{ function Login: Boolean; overload;
|
|
function Login(Usuario: String; Password: String): Boolean; overload;
|
|
procedure Logout;
|
|
procedure CambiarPassword; overload;}
|
|
|
|
// property EsAdministrador : Boolean read GetEsAdministrador;
|
|
// property IDEmpresaActual : Integer read GetIDEmpresaActual write SetIDEmpresaActual;
|
|
// property EmpresaActual : IBizEmpresa read FEmpresaActual write SetEmpresaActual;
|
|
// property Empresas : TIntegerList read GetEmpresas;
|
|
// property LoginInfo: TRdxLoginInfo read FLoginInfo;
|
|
property DataConnector : TUCDataConnector read GetDataConnector;
|
|
property UCSettings: TUCSettings read GetUCSettings;
|
|
end;
|
|
|
|
implementation
|
|
|
|
{$R *.DFM}
|
|
|
|
uses
|
|
Forms, Controls, uDataTableUtils, uDataModuleConexion,
|
|
Dialogs, Windows, uEmpresasController,
|
|
schUsuariosClient_Intf;
|
|
|
|
{ TDAClientDataModule1 }
|
|
|
|
procedure TDataModuleUsuarios.DAClientDataModuleCreate(Sender: TObject);
|
|
begin
|
|
ROLoginService.Channel := dmConexion.Channel;
|
|
ROLoginService.Message := dmConexion.Message;
|
|
|
|
FDataConnector := TUCROConn.Create(nil);
|
|
FDataConnector.RemoteService := srvUsuarios;
|
|
|
|
FUsuario := '';
|
|
FPassword := '';
|
|
FLoginInfo := NIL;
|
|
end;
|
|
|
|
{function TDataModuleUsuarios.Login: Boolean;
|
|
begin
|
|
// Intento hacer login si el usuario ya lo había hecho antes
|
|
if (Length(FUsuario) > 0) then
|
|
if Login(FUsuario, FPassword) then
|
|
begin
|
|
Result := True;
|
|
Exit;
|
|
end;
|
|
|
|
// Si no funcionar el login anterior o es la primera vez,
|
|
// saco la pantalla de login
|
|
with TfLoginForm.Create(NIL) do
|
|
try
|
|
if Assigned(FLoginInfo) then
|
|
edtUser.Text := FLoginInfo.Usuario;
|
|
Result := (ShowModal = mrOK)
|
|
finally
|
|
Free;
|
|
end;
|
|
end;}
|
|
|
|
{function TDataModuleUsuarios.Login(Usuario: String; Password: String): Boolean;
|
|
begin
|
|
// Libero la información del login anterior (sesión, etc)
|
|
if Assigned(FLoginInfo) then
|
|
FreeANDNil(FLoginInfo);
|
|
|
|
Result := (ROLoginService as IsrvLogin).Login(Usuario, Password, FLoginInfo);
|
|
|
|
if Result then
|
|
begin
|
|
// Lo guardo para poder reconectarme
|
|
FUsuario := Usuario;
|
|
FPassword := Password;
|
|
end;
|
|
end;}
|
|
|
|
{procedure TDataModuleUsuarios.Logout;
|
|
begin
|
|
(ROLoginService as IsrvLogin).Logout;
|
|
if Assigned(FLoginInfo) then
|
|
FreeANDNil(FLoginInfo);
|
|
FUsuario := '';
|
|
FPassword := '';
|
|
end;}
|
|
|
|
{procedure TDataModuleUsuarios.SetEmpresaActual(const Value: IBizEmpresa);
|
|
begin
|
|
FEmpresaActual := Value;
|
|
FEmpresaActual.DataTable.Active := True;
|
|
end;}
|
|
|
|
{procedure TDataModuleUsuarios.SetIDEmpresaActual(const Value: Integer);
|
|
var
|
|
AEmpresasController : IEmpresasController;
|
|
AEmpresa : IBizEmpresa;
|
|
begin
|
|
AEmpresasController := TEmpresasController.Create;
|
|
AEmpresa := AEmpresasController.Buscar(Value);
|
|
AEmpresa.DataTable.Active := True;
|
|
|
|
if not AEmpresa.IsEmpty then
|
|
begin
|
|
FEmpresaActual := AEmpresa;
|
|
FEmpresaActual.DataTable.Active := True;
|
|
end
|
|
else
|
|
FEmpresaActual := NIL;
|
|
end;}
|
|
|
|
procedure TDataModuleUsuarios.DAClientDataModuleDestroy(Sender: TObject);
|
|
begin
|
|
if Assigned(FDataConnector) then
|
|
FreeANDNIL(FDataConnector);
|
|
|
|
if Assigned(FLoginInfo) then
|
|
FreeANDNIL(FLoginInfo);
|
|
end;
|
|
|
|
function TDataModuleUsuarios.GetDataConnector: TUCDataConnector;
|
|
begin
|
|
Result := FDataConnector;
|
|
end;
|
|
|
|
{function TDataModuleUsuarios.GetEmpresas: TIntegerList;
|
|
var
|
|
i : integer;
|
|
begin
|
|
Result := TIntegerList.Create;
|
|
|
|
if not Assigned(FLoginInfo) then
|
|
raise Exception.Create('Usuario no validado en el sistema (login)');
|
|
|
|
for i := 0 to FLoginInfo.Empresas.Count - 1 do
|
|
Result.Add(FLoginInfo.Empresas.Items[i]);
|
|
end;
|
|
|
|
function TDataModuleUsuarios.GetEsAdministrador: Boolean;
|
|
var
|
|
I: Integer;
|
|
begin
|
|
Result := False;
|
|
|
|
if not Assigned(FLoginInfo) then
|
|
raise Exception.Create('Usuario no validado en el sistema (login)');
|
|
|
|
for I := 0 to FLoginInfo.Perfiles.Count - 1 do
|
|
if FLoginInfo.Perfiles.Items[I] = PERFIL_ADMINISTRADORES then
|
|
begin
|
|
Result := True;
|
|
Break;
|
|
end;
|
|
end;
|
|
|
|
function TDataModuleUsuarios.GetIDEmpresaActual: Integer;
|
|
begin
|
|
if not Assigned(FEmpresaActual) then
|
|
Result := ID_NULO
|
|
else
|
|
Result := FEmpresaActual.ID;
|
|
end; }
|
|
|
|
function TDataModuleUsuarios.GetUCSettings: TUCSettings;
|
|
begin
|
|
Result := UCSettingsSpanish;
|
|
end;
|
|
|
|
procedure TDataModuleUsuarios.InicializarCamposUserControl(
|
|
AUserControl: TUserControl);
|
|
begin
|
|
if not Assigned(AUserControl) then
|
|
raise Exception.Create('UserControl no asignado (InicializarUserControl)');
|
|
|
|
with AUserControl do
|
|
begin
|
|
DataConnector := FDataConnector;
|
|
|
|
with TableUsers do
|
|
begin
|
|
TableName := nme_USUARIOS;
|
|
FieldUserID := fld_USUARIOSID;
|
|
FieldUserName := fld_USUARIOSUSERNAME;
|
|
FieldLogin := fld_USUARIOSLOGIN;
|
|
FieldPassword := fld_USUARIOSPASS;
|
|
FieldEmail := fld_USUARIOSEMAIL;
|
|
FieldPrivileged := fld_USUARIOSPRIVILEGED;
|
|
FieldTypeRec := fld_USUARIOSTIPO;
|
|
FieldProfile := fld_USUARIOSID_PERFIL;
|
|
FieldUserExpired := fld_USUARIOSBLOQUEADO;
|
|
FieldDateExpired := fld_USUARIOSPASSEXPIRED;
|
|
FieldUserDaysSun := fld_USUARIOSUSERDAYSSUN;
|
|
FieldKey := fld_USUARIOSCHECKSUM;
|
|
end;
|
|
|
|
with TableRights do
|
|
begin
|
|
TableName := nme_PERMISOS;
|
|
FieldUserID := fld_PERMISOSID_USUARIO;
|
|
FieldModule := fld_PERMISOSMODULO;
|
|
FieldComponentName := fld_PERMISOSNOMBRECOMP;
|
|
FieldFormName := fld_PERMISOSEXNOMBREFORM;
|
|
FieldKey := fld_PERMISOSCHECKSUM;
|
|
end;
|
|
|
|
with TableUsersLogged do
|
|
begin
|
|
TableName := nme_USUARIOS_LOGON;
|
|
FieldLogonID := fld_USUARIOS_LOGONLOGONID;
|
|
FieldUserID := fld_USUARIOS_LOGONID_USUARIO;
|
|
FieldApplicationID := fld_USUARIOS_LOGONAPLICACION;
|
|
FieldMachineName := fld_USUARIOS_LOGONEQUIPO;
|
|
FieldData := fld_USUARIOS_LOGONDATA;
|
|
end;
|
|
|
|
with TableHistory do
|
|
begin
|
|
TableName := nme_USUARIOS_EVENTOS;
|
|
FieldApplicationID := fld_USUARIOS_EVENTOSAPLICACION;
|
|
FieldUserID := fld_USUARIOS_EVENTOSID_USUARIO;
|
|
FieldEventDate := fld_USUARIOS_EVENTOSFECHA;
|
|
FieldEventTime := fld_USUARIOS_EVENTOSHORA;
|
|
FieldForm := fld_USUARIOS_EVENTOSFORM;
|
|
FieldCaptionForm := fld_USUARIOS_EVENTOSTITULO_FORM;
|
|
FieldEvent := fld_USUARIOS_EVENTOSEVENTO;
|
|
FieldObs := fld_USUARIOS_EVENTOSNOTAS;
|
|
FieldTableName := fld_USUARIOS_EVENTOSTNAME;
|
|
end;
|
|
|
|
end;
|
|
end;
|
|
|
|
procedure TDataModuleUsuarios.InicializarSettingsUserControl(
|
|
AUserControl: TUserControl);
|
|
var
|
|
SourceSettings : TUCSettings;
|
|
begin
|
|
SourceSettings := UCSettingsSpanish;
|
|
|
|
with AUserControl do
|
|
begin
|
|
with UserSettings.CommonMessages do
|
|
begin
|
|
BlankPassword := SourceSettings.CommonMessages.BlankPassword;
|
|
PasswordChanged := SourceSettings.CommonMessages.PasswordChanged;
|
|
InitialMessage.Text := SourceSettings.CommonMessages.InitialMessage.Text;
|
|
MaxLoginAttemptsError := SourceSettings.CommonMessages.MaxLoginAttemptsError;
|
|
InvalidLogin := SourceSettings.CommonMessages.InvalidLogin;
|
|
AutoLogonError := SourceSettings.CommonMessages.AutoLogonError;
|
|
UsuarioExiste := SourceSettings.CommonMessages.UsuarioExiste; // Luiz Benevenuto 20/04/06
|
|
PasswordExpired := SourceSettings.CommonMessages.PasswordExpired; // vicente barros leonel
|
|
ForcaTrocaSenha := SourceSettings.CommonMessages.ForcaTrocaSenha;
|
|
end;
|
|
|
|
with UserSettings.Login do
|
|
begin
|
|
BtCancel := SourceSettings.Login.BtCancel;
|
|
BtOK := SourceSettings.Login.BtOK;
|
|
LabelPassword := SourceSettings.Login.LabelPassword;
|
|
LabelUser := SourceSettings.Login.LabelUser;
|
|
WindowCaption := SourceSettings.Login.WindowCaption;
|
|
LabelTentativa := SourceSettings.Login.LabelTentativa;
|
|
LabelTentativas := SourceSettings.Login.LabelTentativas;
|
|
|
|
if Assigned(SourceSettings.Login.LeftImage.Bitmap) then
|
|
LeftImage.Bitmap := SourceSettings.Login.LeftImage.Bitmap
|
|
else
|
|
LeftImage.Bitmap := nil;
|
|
|
|
if Assigned(SourceSettings.Login.TopImage.Bitmap) then
|
|
TopImage.Bitmap := SourceSettings.Login.TopImage.Bitmap
|
|
else
|
|
TopImage.Bitmap := nil;
|
|
|
|
if Assigned(SourceSettings.Login.BottomImage.Bitmap) then
|
|
BottomImage.Bitmap := SourceSettings.Login.BottomImage.Bitmap
|
|
else
|
|
BottomImage.Bitmap := nil;
|
|
end;
|
|
|
|
with UserSettings.UsersForm do
|
|
begin
|
|
WindowCaption := SourceSettings.UsersForm.WindowCaption;
|
|
LabelDescription := SourceSettings.UsersForm.LabelDescription;
|
|
ColName := SourceSettings.UsersForm.ColName;
|
|
ColLogin := SourceSettings.UsersForm.ColLogin;
|
|
ColEmail := SourceSettings.UsersForm.ColEmail;
|
|
BtAdd := SourceSettings.UsersForm.BtAdd;
|
|
BtChange := SourceSettings.UsersForm.BtChange;
|
|
BtDelete := SourceSettings.UsersForm.BtDelete;
|
|
BtRights := SourceSettings.UsersForm.BtRights;
|
|
BtPassword := SourceSettings.UsersForm.BtPassword;
|
|
BtClose := SourceSettings.UsersForm.BtClose;
|
|
PromptDelete := SourceSettings.UsersForm.PromptDelete;
|
|
PromptDelete_WindowCaption := SourceSettings.UsersForm.PromptDelete_WindowCaption; //added by fduenas
|
|
end;
|
|
|
|
with UserSettings.UsersProfile do
|
|
begin
|
|
WindowCaption := SourceSettings.UsersProfile.WindowCaption;
|
|
LabelDescription := SourceSettings.UsersProfile.LabelDescription;
|
|
ColProfile := SourceSettings.UsersProfile.ColProfile;
|
|
BtAdd := SourceSettings.UsersProfile.BtAdd;
|
|
BtChange := SourceSettings.UsersProfile.BtChange;
|
|
BtDelete := SourceSettings.UsersProfile.BtDelete;
|
|
BtRights := SourceSettings.UsersProfile.BtRights; //added by fduenas
|
|
BtClose := SourceSettings.UsersProfile.BtClose;
|
|
PromptDelete := SourceSettings.UsersProfile.PromptDelete;
|
|
PromptDelete_WindowCaption := SourceSettings.UsersProfile.PromptDelete_WindowCaption; //added by fduenas
|
|
end;
|
|
|
|
with UserSettings.AddChangeUser do
|
|
begin
|
|
WindowCaption := SourceSettings.AddChangeUser.WindowCaption;
|
|
LabelAdd := SourceSettings.AddChangeUser.LabelAdd;
|
|
LabelChange := SourceSettings.AddChangeUser.LabelChange;
|
|
LabelName := SourceSettings.AddChangeUser.LabelName;
|
|
LabelLogin := SourceSettings.AddChangeUser.LabelLogin;
|
|
LabelEmail := SourceSettings.AddChangeUser.LabelEmail;
|
|
CheckPrivileged := SourceSettings.AddChangeUser.CheckPrivileged;
|
|
BtSave := SourceSettings.AddChangeUser.BtSave;
|
|
BtCancel := SourceSettings.AddChangeUser.BtCancel;
|
|
CheckExpira := SourceSettings.AddChangeUser.CheckExpira;
|
|
Day := SourceSettings.AddChangeUser.Day;
|
|
ExpiredIn := SourceSettings.AddChangeUser.ExpiredIn;
|
|
end;
|
|
|
|
with UserSettings.AddChangeProfile do
|
|
begin
|
|
WindowCaption := SourceSettings.AddChangeProfile.WindowCaption;
|
|
LabelAdd := SourceSettings.AddChangeProfile.LabelAdd;
|
|
LabelChange := SourceSettings.AddChangeProfile.LabelChange;
|
|
LabelName := SourceSettings.AddChangeProfile.LabelName;
|
|
BtSave := SourceSettings.AddChangeProfile.BtSave;
|
|
BtCancel := SourceSettings.AddChangeProfile.BtCancel;
|
|
end;
|
|
|
|
with UserSettings.Rights do
|
|
begin
|
|
WindowCaption := SourceSettings.Rights.WindowCaption;
|
|
LabelUser := SourceSettings.Rights.LabelUser;
|
|
LabelProfile := SourceSettings.Rights.LabelProfile;
|
|
PageMenu := SourceSettings.Rights.PageMenu;
|
|
PageActions := SourceSettings.Rights.PageActions;
|
|
PageControls := SourceSettings.Rights.PageControls;
|
|
BtUnlock := SourceSettings.Rights.BtUnlock;
|
|
BtLock := SourceSettings.Rights.BtLock;
|
|
BtSave := SourceSettings.Rights.BtSave;
|
|
BtCancel := SourceSettings.Rights.BtCancel;
|
|
end;
|
|
|
|
with UserSettings.ChangePassword do
|
|
begin
|
|
WindowCaption := SourceSettings.ChangePassword.WindowCaption;
|
|
LabelDescription := SourceSettings.ChangePassword.LabelDescription;
|
|
LabelCurrentPassword := SourceSettings.ChangePassword.LabelCurrentPassword;
|
|
LabelNewPassword := SourceSettings.ChangePassword.LabelNewPassword;
|
|
LabelConfirm := SourceSettings.ChangePassword.LabelConfirm;
|
|
BtSave := SourceSettings.ChangePassword.BtSave;
|
|
BtCancel := SourceSettings.ChangePassword.BtCancel;
|
|
end;
|
|
|
|
with UserSettings.CommonMessages.ChangePasswordError do
|
|
begin
|
|
InvalidCurrentPassword := SourceSettings.CommonMessages.ChangePasswordError.InvalidCurrentPassword;
|
|
NewPasswordError := SourceSettings.CommonMessages.ChangePasswordError.NewPasswordError;
|
|
NewEqualCurrent := SourceSettings.CommonMessages.ChangePasswordError.NewEqualCurrent;
|
|
PasswordRequired := SourceSettings.CommonMessages.ChangePasswordError.PasswordRequired;
|
|
MinPasswordLength := SourceSettings.CommonMessages.ChangePasswordError.MinPasswordLength;
|
|
InvalidNewPassword := SourceSettings.CommonMessages.ChangePasswordError.InvalidNewPassword;
|
|
end;
|
|
|
|
with UserSettings.ResetPassword do
|
|
begin
|
|
WindowCaption := SourceSettings.ResetPassword.WindowCaption;
|
|
LabelPassword := SourceSettings.ResetPassword.LabelPassword;
|
|
end;
|
|
|
|
with UserSettings.Log do
|
|
begin
|
|
WindowCaption := SourceSettings.Log.WindowCaption;
|
|
LabelDescription := SourceSettings.Log.LabelDescription;
|
|
LabelUser := SourceSettings.Log.LabelUser;
|
|
LabelDate := SourceSettings.Log.LabelDate;
|
|
LabelLevel := SourceSettings.Log.LabelLevel;
|
|
ColLevel := SourceSettings.Log.ColLevel;
|
|
ColMessage := SourceSettings.Log.ColMessage;
|
|
ColUser := SourceSettings.Log.ColUser;
|
|
ColDate := SourceSettings.Log.ColDate;
|
|
BtFilter := SourceSettings.Log.BtFilter;
|
|
BtDelete := SourceSettings.Log.BtDelete;
|
|
BtClose := SourceSettings.Log.BtClose;
|
|
PromptDelete := SourceSettings.Log.PromptDelete;
|
|
PromptDelete_WindowCaption := SourceSettings.Log.PromptDelete_WindowCaption; //added by fduenas
|
|
OptionUserAll := SourceSettings.Log.OptionUserAll; //added by fduenas
|
|
OptionLevelLow := SourceSettings.Log.OptionLevelLow; //added by fduenas
|
|
OptionLevelNormal := SourceSettings.Log.OptionLevelNormal; //added by fduenas
|
|
OptionLevelHigh := SourceSettings.Log.OptionLevelHigh; //added by fduenas
|
|
OptionLevelCritic := SourceSettings.Log.OptionLevelCritic; //added by fduenas
|
|
DeletePerformed := SourceSettings.Log.DeletePerformed; //added by fduenas
|
|
end;
|
|
|
|
with UserSettings.AppMessages do
|
|
begin
|
|
MsgsForm_BtNew := SourceSettings.AppMessages.MsgsForm_BtNew;
|
|
MsgsForm_BtReplay := SourceSettings.AppMessages.MsgsForm_BtReplay;
|
|
MsgsForm_BtForward := SourceSettings.AppMessages.MsgsForm_BtForward;
|
|
MsgsForm_BtDelete := SourceSettings.AppMessages.MsgsForm_BtDelete;
|
|
MsgsForm_BtClose := SourceSettings.AppMessages.MsgsForm_BtClose; //added by fduenas
|
|
MsgsForm_WindowCaption := SourceSettings.AppMessages.MsgsForm_WindowCaption;
|
|
MsgsForm_ColFrom := SourceSettings.AppMessages.MsgsForm_ColFrom;
|
|
MsgsForm_ColSubject := SourceSettings.AppMessages.MsgsForm_ColSubject;
|
|
MsgsForm_ColDate := SourceSettings.AppMessages.MsgsForm_ColDate;
|
|
MsgsForm_PromptDelete := SourceSettings.AppMessages.MsgsForm_PromptDelete;
|
|
MsgsForm_PromptDelete_WindowCaption := SourceSettings.AppMessages.MsgsForm_PromptDelete_WindowCaption; //added by fduenas
|
|
MsgsForm_NoMessagesSelected := SourceSettings.AppMessages.MsgsForm_NoMessagesSelected; //added by fduenas
|
|
MsgsForm_NoMessagesSelected_WindowCaption := SourceSettings.AppMessages.MsgsForm_NoMessagesSelected_WindowCaption; //added by fduenas
|
|
|
|
MsgRec_BtClose := SourceSettings.AppMessages.MsgRec_BtClose;
|
|
MsgRec_WindowCaption := SourceSettings.AppMessages.MsgRec_WindowCaption;
|
|
MsgRec_Title := SourceSettings.AppMessages.MsgRec_Title;
|
|
MsgRec_LabelFrom := SourceSettings.AppMessages.MsgRec_LabelFrom;
|
|
MsgRec_LabelDate := SourceSettings.AppMessages.MsgRec_LabelDate;
|
|
MsgRec_LabelSubject := SourceSettings.AppMessages.MsgRec_LabelSubject;
|
|
MsgRec_LabelMessage := SourceSettings.AppMessages.MsgRec_LabelMessage;
|
|
MsgSend_BtSend := SourceSettings.AppMessages.MsgSend_BtSend;
|
|
MsgSend_BtCancel := SourceSettings.AppMessages.MsgSend_BtCancel;
|
|
MsgSend_WindowCaption := SourceSettings.AppMessages.MsgSend_WindowCaption;
|
|
MsgSend_Title := SourceSettings.AppMessages.MsgSend_Title;
|
|
MsgSend_GroupTo := SourceSettings.AppMessages.MsgSend_GroupTo;
|
|
MsgSend_RadioUser := SourceSettings.AppMessages.MsgSend_RadioUser;
|
|
MsgSend_RadioAll := SourceSettings.AppMessages.MsgSend_RadioAll;
|
|
MsgSend_GroupMessage := SourceSettings.AppMessages.MsgSend_GroupMessage;
|
|
MsgSend_LabelSubject := SourceSettings.AppMessages.MsgSend_LabelSubject; //added by fduenas
|
|
MsgSend_LabelMessageText := SourceSettings.AppMessages.MsgSend_LabelMessageText; //added by fduenas
|
|
end;
|
|
|
|
With UserSettings.History do
|
|
Begin
|
|
Evento_edit := SourceSettings.History.Evento_edit;
|
|
Evento_NewRecord := SourceSettings.History.Evento_NewRecord;
|
|
Evento_Insert := SourceSettings.History.Evento_Insert;
|
|
Evento_delete := SourceSettings.History.Evento_Delete;
|
|
LabelTabela := SourceSettings.History.LabelTabela;
|
|
Msg_LogEmptyHistory := SourceSettings.History.Msg_LogEmptyHistory;
|
|
Msg_MensConfirma := SourceSettings.History.Msg_MensConfirma;
|
|
LabelDescricao := SourceSettings.History.LabelDescricao;
|
|
Hist_BtnExcluir := SourceSettings.History.Hist_BtnExcluir;
|
|
Hist_BtnFiltro := SourceSettings.History.Hist_BtnFiltro;
|
|
LabelForm := SourceSettings.History.LabelForm;
|
|
Hist_BtnFechar := SourceSettings.History.Hist_BtnFechar;
|
|
LabelDataEvento := SourceSettings.History.LabelDataEvento;
|
|
LabelEvento := SourceSettings.History.LabelEvento;
|
|
Msg_NewRecord := SourceSettings.History.Msg_NewRecord;
|
|
Hist_All := SourceSettings.History.Hist_All;
|
|
Msg_LimpHistorico := SourceSettings.History.Msg_LimpHistorico;
|
|
LabelHoraEvento := SourceSettings.History.LabelHoraEvento;
|
|
LabelUser := SourceSettings.History.LabelUser;
|
|
Hist_MsgExceptPropr := SourceSettings.History.Hist_MsgExceptPropr;
|
|
End;
|
|
|
|
with UserSettings.TypeFieldsDB do
|
|
Begin
|
|
Type_VarChar := SourceSettings.TypeFieldsDB.Type_VarChar;
|
|
Type_Char := SourceSettings.TypeFieldsDB.Type_Char;
|
|
Type_Int := SourceSettings.TypeFieldsDB.Type_Int;
|
|
Type_MemoField := SourceSettings.TypeFieldsDB.Type_MemoField;
|
|
end;
|
|
|
|
UserSettings.WindowsPosition := SourceSettings.WindowsPosition;
|
|
end;
|
|
end;
|
|
|
|
procedure TDataModuleUsuarios.InicializarUserControl(
|
|
AUserControl: TUserControl);
|
|
begin
|
|
if Assigned(AUserControl) then
|
|
begin
|
|
InicializarCamposUserControl(AUserControl);
|
|
InicializarSettingsUserControl(AUserControl);
|
|
end;
|
|
end;
|
|
|
|
{procedure TDataModuleUsuarios.CambiarPassword;
|
|
begin
|
|
with TfCambiarPassword.Create(NIL) do
|
|
try
|
|
if ShowModal = mrOk then
|
|
if CambiarPassword(edtPassword.Text) then
|
|
Application.MessageBox('La contraseña ha sido cambiada correctamente.', 'Información', MB_OK);
|
|
finally
|
|
Free;
|
|
end;
|
|
end;}
|
|
|
|
end.
|