Pular para o conteúdo principal

Abreu Solutions - Develope control

Introdução - app_Control

Descubra o App Abreu Solutions, diponibiza diverças ferramentas em formato framework v4.7.2.

BRA>> (gera código html, configurado por um json com data programada para exibir e ocultar o banner);
USA>> (generates html code, set by a json with date set to show and hide the banner);

Requisição

string Carousel_Id = "Id_Elemento";
string Controller_Id = "Id_Controller";
string Action_Id = "Id_Action";
string JsonPath = "C:\\JsonPath\Banner.json";

{
"Items": [
{
"Id": 1,
"DtTm_Start": "2019-06-12 18:55:48",
"DtTm_End": "2050-06-12 18:55:48",
"Priority": 1,
"Controller": "HOME",
"Action": "INDEX",
"Img": "~/Files/Images/Banner/001.jpg",
"Link": "http://www.google.com.br/",
"Target": "_blank"
},
{
"Id": 2,
"DtTm_Start": "2019-06-12 18:55:48",
"DtTm_End": "2050-06-12 18:55:48",
"Priority": 2,
"Controller": "HOME",
"Action": "INDEX",
"Img": "~/Files/Images/Banner/002.jpg",
"Link": "http://www.google.com.br/",
"Target": "_blank"
},
{...}
]
}

Carousel(Carousel_Id, Controller_Id, Action_Id, JsonPath);

Retorno

Pagination

BRA>> (gera código html);
USA>> (generate html code);

Requisição

int Page = 1;
int PageCount = 11;
int Items = 12;
int ItemsCount = 125;
string Lang = "PTBR";
string ScriptYN = "Y";
Pagination(Page, PageCount, Items, ItemsCount, Lang, ScriptYN);

Retorno

Anterior 1 2 3 Próximo

Converter id em descrição

BRA>> (o nome já fala tudo … A Ativo, I Inativo … F Feminino, M Masculino … 1 A validar, 2 Foi validado, 3 A caminho transportadora);
USA>> (the name says it all… A Active, I Inactive… F Female, M Male… 1 Validating, 2 Validated, 3 On the way carrier);

Requisição

string Id = "F"; (que veio do DB).
string ArrayIds = "F;M;N";
string ArrayLabels = "Feminino;Masculino;Não declarado";
Retorno = ConvertIdToLabel(Id, ArrayIds, ArrayLabels);

Retorno

string Retorno = "F ==>> Feminino";
string Retorno = "M ==>> Masculino";
string Retorno = "N ==>> Não declarado";

Converter id em descrição

BRA>> (o nome já fala tudo … A Ativo, I Inativo … F Feminino, M Masculino … 1 A validar, 2 Foi validado, 3 A caminho transportadora);
USA>> (the name says it all… A Active, I Inactive… F Female, M Male… 1 Validating, 2 Validated, 3 On the way carrier);

Requisição

string Id = "F"; (que veio do DB).
string ArrayIds = "F;M;N";
string ArrayLabels = "Feminino;Masculino;Não declarado";
string ArrayClass = "btn btn-danger;btn btn-primary;btn btn-dark";
ConvertIdToLabel(Id, ArrayIds, ArrayLabels, ArrayClass);

Retorno

"F ==>> Feminino"
"M ==>> Masculino"
"N ==>> Não declarado"

RequestApi (Content-Type: "application/json")

BRA>> (foi feita com propriedades similares ao do “Post Man”);
USA>> (was made with properties similar to that of the “Post Man”);

Requisição

Dictionary <string, string> Header = new Dictionary<string, string>
{
{ "SecretKey", "ex.: 123123123123" },
{ "AuthenticationKey", "ex.: AwAwAwAwAwAwAwAwAw" }
{ "", "" }
{ ... }
};
Dictionary <string, string> Config = new Dictionary<string, string>
{
{ "Method", "POST" }, *
{ "Url", "http(s)://api.site.com" }, *
{ "LogIn", "login@login" },
{ "Password", "******" }
};
string Json = "{ "atributos_da_requisicao" : "valores" }";
jRetorno = RequestApi(Config, Header, Json);

Retorno

string jRetorno = "{ "atributos_do_retorno" : "valores" }";

RequestApi (Content-Type: "multipart/form-data; boundary=...")

BRA>> (foi feita com propriedades similares ao do “Post Man”);
USA>> (was made with properties similar to that of the “Post Man”);

Requisição

Dictionary <string, string> Header = new Dictionary<string, string>
{
{ "SecretKey", "ex.: 123123123123" },
{ "AuthenticationKey", "ex.: AwAwAwAwAwAwAwAwAw" }
{ "", "" }
{ ... }
};
Dictionary <string, string> Config = new Dictionary<string, string>
{
{ "Method", "POST" }, *
{ "Url", "http(s)://api.site.com" }, *
{ "LogIn", "login@login" },
{ "Password", "******" }
};
Dictionary <string, string> Parameters = new Dictionary<string, string>
{
{ "Key", "Value" },
{ "", "" }
{ ... }
};
jRetorno = RequestApi(Config, Header, Parameters);

Retorno

string jRetorno = "{ "atributos_do_retorno" : "valores" }";

RequestHttp

BRA>> (faz requisições em urls, com método GET e POST);
USA>> (make requests in urls, with method GET and POST);

Requisição

string Method = "POST"; //"GET"
string Url = "http://...";
string PostData = "?parA=aaa&parB=bbb...";
RequestHttp(Method, Url, PostData);

Retorno

<html>
<body>
...
</body>
</html>

SendMail

BRA>> (envio de e-mails);
USA>> (sending emails);

Requisição

Dictionary <string, string> Config = new Dictionary<string, string>
{
{ "SmtpHost", "smtp.site.com" }, *
{ "SmtpPort", "582" }, *
{ "SmtpLogIn", "email@site.com" }, *
{ "SmtpPassword", "******" }, *
{ "MailAddress", "address@site.com" }, *
{ "MailDisplayName", "Display Name" }, *
{ "MailSubject", "Subject" }, *
{ "MailNotification", "notification@site.com" },
{ "MailBcc", "bccA@site.com;bccB@site.com;bccC@site.com" },
{ "MailTo", "user_to@site.com" } *
};
Dictionary <string, string> Params = new Dictionary<string, string>
{
{ "Attachments", "C:\\Attachments\File.docx" }
{ "BodyHtml", "<html><body>...</body></html>" }
};
MailReturn = SendMail(Config, Params);

Retorno

Dictionary <string, string> MailReturn = new Dictionary<string, string>();
MailReturn["Status"];
MailReturn["Descricao"];
MailReturn["Description"];

Comentários

Postagens mais visitadas deste blog

Abreu Solutions - Develope introdução

Abreu Solutions - Develope format