Welcome!

This community is for professionals and enthusiasts of the Genio platform.
Share your questions and challenges, and help your partners!

0

0
Sonia Fernandes
On 3/30/21, 4:58 PM

Create a MANWIN USER_IMAGE


E.g. Login for two different kinds of people
(for one type you just need the first branch of the if statement)


//Para validar se existe EPH pretendido
if (user.Ephs != null && user.Ephs.ContainsKey("ALU_ACESSO_ALUNO"))
{
string[] eph = (string[])user.Ephs["ALU_ACESSO_ALUNO"];

SelectQuery selquery = new SelectQuery()
.Select(CSGenioAaluno.FldNome)
.Select(CSGenioAaluno.FldFoto)
.Select(CSGenioAaluno.FldNrmecano)
.From(Area.AreaALUNO)
.Where(Quidgest.Persistence.GenericQuery.CriteriaSet.And()
.Equal(CSGenioAaluno.FldCodaluno, eph[0])
);

DataMatrix data = sp.Execute(selquery);
if (data.NumRows > 0)
{
fullname = data.GetString(0, 0);
image = data.GetBinary(0, 1);
position = data.GetString(0, 2);
}
}
else
if (user.Ephs != null && user.Ephs.ContainsKey("UMI_DOCENTE"))
{
string[] eph = (string[])user.Ephs["UMI_DOCENTE"];

SelectQuery selquery = new SelectQuery()
.Select(CSGenioApesso.FldNome)
.Select(CSGenioApesso.FldPhotogra)
.Select(CSGenioApesso.FldEmail)
.From(Area.AreaPESSO)
.Where(Quidgest.Persistence.GenericQuery.CriteriaSet.And()
.Equal(CSGenioApesso.FldCodpesso, eph[0])
);

DataMatrix data = sp.Execute(selquery);
if (data.NumRows > 0)
{
fullname = data.GetString(0, 0);
image = data.GetBinary(0, 1);
position = data.GetString(0, 2);
}
}









---------------------------------------------------------------------------------------------------------------


To extend to all system its be necessary to specify the module name