// <CompileWithRoslyn />
public void MethodForMercatorTasksCompanyWeb()
{
MercatorUi.Sig.SigCli sigCli = MercatorUi.Sig._SigsStatic.SigByModule<MercatorUi.Sig.SigCli>();
List<(string c_id, string c_nom)> customers = Api.Zselect<(string c_id, string c_nom)>(Globals.RepData, "select top … c_id,c_nom FROM CLI where … order by …");
if (customers == null)
{
MercatorUi.Globals.MercatorTasksToMain.Log("Error CompanyWeb : " + Api.LastError, isError: true);
return;
}
int success = 0;
int errors = 0;
foreach ((string c_id, string c_nom) tuple in customers)
{
if (sigCli.UpdateCompanyWeb(tuple.c_id, out string error))
{
success++;
}
else
{
MercatorUi.Globals.MercatorTasksToMain.Log($"Error CompanyWeb : {tuple.c_id} {tuple.c_nom} : {error}", isError: true);
errors++;
}
}
MercatorUi.Globals.MercatorTasksToMain.Log($"Update CompanyWeb : success = {success} / errors = {errors}", isError: errors > 0);
}