<%@ Page Language="C#" Buffer="true" CodeFile="gestion_inscription_cantine.aspx.cs" Inherits="_gestion_inscription_cantine" CodePage="65001" UICulture="fr" Culture="fr-FR" ValidateRequest="false" %> <%@ Import Namespace="ItlRuntime" %> <%@ Import Namespace="System.Collections.Generic" %> <%@ Import Namespace="System.Linq" %> <% EC.linkableClassMap = (Map) EC.newMap(new Map() , "ocsNewsEvent:news", new ClassLink("./page00013329.aspx?card=object", "linkTable.aspx?GID=00013329&card=object", "Actualité")); %><% EC.imageProviderUrl = "./imageProvider.aspx"; %><% EC.albumDialogUrl = "./albumDialog.aspx"; %><% EC.albumPrivateDialogUrl = "./albumPrivateDialog.aspx"; %> " /> Inscriptions à la cantine

Téléservices

<% if (EC.currentUser != null) { EC.Page.Response.Write(EC.itl.login()); EC.Page.Response.Write(" "); } { DateTime date = DateTime.Now; EC.Page.Response.Write(EC.itl.formatTimestamp(date, "date")); EC.Page.Response.Write(" "); EC.Page.Response.Write(EC.itl.formatTimestamp(date, "hours")); } %>


 
<% EC.Request.dumpRepostForm(); int? currentStatus = (int?) ((int?)EC.itl.getParameterValue("integer", "currentStatus", 0)); SqlObject modifiedCard = (SqlObject) (new SqlObject("dm:form_cantine", @"SELECT this.`_oid` AS this FROM dm_form_cantine AS this INNER JOIN sf_form AS this_z On ((this.`_oid` = this_z.`_oid`) AND (this_z.iso_sid <> '')) WHERE (this.iso_sid <> '') AND (this.`_oid` = #V_0&;)", new Map("#V_0&;|integer", EC.itl.toInteger(EC.itl.getParameterValue("object:dm:form_cantine", "modifiedCard"))),true)); string mode = (string) ((string)EC.itl.getParameterValue("string", "mode")); string cmd = (string) ((string)EC.itl.getParameterValue("string", "cmd")); string oids = (string) ((string)EC.itl.getParameterValue("string", "oids")); int? newStatus = (int?) ((int?)EC.itl.getParameterValue("integer", "newStatus")); if(cmd == "newCardStatus") { ItlUpdateObject c1 = new ItlUpdateObject("dm:form_cantine", null, modifiedCard); ; c1.setField("sfStatus", newStatus, "integer", "sf:form"); c1.exec();; } else if(cmd == "deleteCard") { ItlDelete c2 = new ItlDelete("dm:form_cantine", modifiedCard); ; c2.exec();; } else if(cmd == "newStatus") { if(oids == "all") { %>- <% ItlUpdateCollection c4 = new ItlUpdateCollection("dm:form_cantine", new SqlCollection("dm:form_cantine", "SELECT \nthis.`_oid` AS this \nFROM dm_form_cantine AS this\nINNER JOIN sf_form AS this_z\nOn ((this.`_oid` = this_z.`_oid`) AND (this_z.iso_sid <> '')) \nWHERE \n(this.iso_sid <> '') \nAND (#V_0&; OR (this_z.sfStatus = #V_1&;))", new Map("#V_0&;|boolean", (currentStatus == -1), "#V_1&;|integer", currentStatus), null), (List>) EC.newList(new List>(), (List) EC.newList(new List(), "UPDATE sf_form \nSET \nsfStatus = #V_2&;", new Map("#V_0&;|boolean", (currentStatus == -1), "#V_1&;|integer", currentStatus, "#V_2&;|integer", newStatus)))); ; c4.exec();; } else { ItlEnumerator e6 = new ItlEnumerator("G00010cd1_5", null, false); e6.add(new SqlEnumerator(new ItlRuntime.SQL.Collection("dm:form_cantine", @"SELECT this.`_oid` AS this FROM dm_form_cantine AS this INNER JOIN sf_form AS this_z On ((this.`_oid` = this_z.`_oid`) AND (this_z.iso_sid <> '')) WHERE (this.iso_sid <> '') AND (this.`_oid` IN (#V_0&;))", new ItlRuntime.SQL.Parameters( new ItlRuntime.SQL.Parameter("#V_0&;", ITL.S(oids), "oids")), new ItlRuntime.SQL.OrderAliases(), new ItlRuntime.SQL.OptionalOrderAliases(), null, null), @"SELECT this.`_oid` AS this FROM dm_form_cantine AS this INNER JOIN sf_form AS this_z On ((this.`_oid` = this_z.`_oid`) AND (this_z.iso_sid <> '')) WHERE (this.iso_sid <> '')", new Map(), false, (List) EC.newList(new List()), null, null)); ItlEnumerator c = (ItlEnumerator) (e6); c.reset(); if(c.isNotEmpty()) { c.resetGroup(); for(c.start();c.test();c.fetch()) { ItlUpdateObject c7 = new ItlUpdateObject("dm:form_cantine", null, c); ; c7.setField("sfStatus", newStatus, "integer", "sf:form"); c7.exec();; } } c.finish(); } } SqlObject _t0 = new SqlObject("dm:form_cantine", @"SELECT this.`_oid` AS this FROM dm_form_cantine AS this INNER JOIN sf_form AS this_z On ((this.`_oid` = this_z.`_oid`) AND (this_z.iso_sid <> '')) WHERE (this.iso_sid <> '') AND (#V_0&; OR (#V_1&; = this_z.sfStatus)) ORDER BY this_z.sfModificationDate ASC, this_z.sfCreationDate DESC", new Map("#V_0&;|boolean", (currentStatus == -1), "#V_1&;|integer", currentStatus),false); SqlObject card = (SqlObject) (new SqlObject("dm:form_cantine", @"SELECT this.`_oid` AS this, this.nom_de_l_enfant AS this_p_nom_de_l_enfant, this.prenom_de_l_enfant AS this_p_prenom_de_l_enfant, this.adresse_des_parents AS this_p_adresse_des_parents, this.date_de_naissance_de_l_enfant AS this_p_date_de_naissance_de_l_enfant, this.regime_allergies AS this_p_regime_allergies, this.lundi AS this_p_lundi, this.mardi AS this_p_mardi, this.mercredi AS this_p_mercredi, this.jeudi AS this_p_jeudi, this.vendredi AS this_p_vendredi, this_s_classe_de_l_enfant.label_fr AS this_s_classe_de_l_enfant_p_label_fr, this_s_classe_de_l_enfant.`_oid` AS this_s_classe_de_l_enfant, this_s_photo_d_identite.width AS this_s_photo_d_identite_p_width, this_s_photo_d_identite.height AS this_s_photo_d_identite_p_height, this_s_photo_d_identite.frames AS this_s_photo_d_identite_p_frames, this_s_photo_d_identite.`_oid` AS this_s_photo_d_identite, this_s_photo_d_identite_z.urlDir AS this_s_photo_d_identite_z_p_urlDir, this_s_photo_d_identite_z.filename AS this_s_photo_d_identite_z_p_filename, this_s_photo_d_identite_z.extension AS this_s_photo_d_identite_z_p_extension, this_s_photo_d_identite_z.filesize AS this_s_photo_d_identite_z_p_filesize, this_s_photo_d_identite_z.filedate AS this_s_photo_d_identite_z_p_filedate, this_s_photo_d_identite_z.label_fr AS this_s_photo_d_identite_z_p_label_fr, this_s_photo_d_identite_z.description_fr AS this_s_photo_d_identite_z_p_description_fr, this_z.sfCreationDate AS this_z_p_sfCreationDate, this_z.sfModificationDate AS this_z_p_sfModificationDate, this_z.sfModifierLogin AS this_z_p_sfModifierLogin, this_z.sfStatus AS this_z_p_sfStatus FROM dm_form_cantine AS this INNER JOIN sf_form AS this_z On ((this.`_oid` = this_z.`_oid`) AND (this_z.iso_sid <> '')) LEFT JOIN omc_stringItem AS this_s_classe_de_l_enfant On ((this.classe_de_l_enfant = this_s_classe_de_l_enfant.`_oid`) AND (this_s_classe_de_l_enfant.iso_sid <> '')) LEFT JOIN (alb_private_image AS this_s_photo_d_identite INNER JOIN alb_private_resource AS this_s_photo_d_identite_z On ((this_s_photo_d_identite.`_oid` = this_s_photo_d_identite_z.`_oid`) AND (this_s_photo_d_identite_z.iso_sid <> ''))) On ((this.photo_d_identite = this_s_photo_d_identite.`_oid`) AND (this_s_photo_d_identite.iso_sid <> '')) WHERE (this.iso_sid <> '') AND (this.`_oid` = #V_0&;)", new Map("#V_0&;|integer", EC.itl.toInteger(EC.itl.getParameterValue("object:dm:form_cantine", "card", EC.itl.toInteger(_t0)))),true)); if(cmd == "editCard") { ItlUpdateObject c13 = new ItlUpdateObject("dm:form_cantine", "card", card); ; c13.setField("sfModifierLogin", EC.itl.login(), "string", "sf:form", 64); c13.setField("sfModificationDate", EC.itl.now(), "date", "sf:form"); c13.exec();; } %>

Inscriptions à la cantine (<% ITL.show(EC.itl.toInteger(new SqlCollection("dm:form_cantine", @"SELECT COUNT(DISTINCT this.data) AS result FROM (SELECT this.`_oid` AS this, this.`_oid` AS data FROM dm_form_cantine AS this INNER JOIN (sf_form AS this_z LEFT JOIN sf_catalog AS this_z_s_sfCatalog On ((this_z.sfCatalog = this_z_s_sfCatalog.`_oid`) AND (this_z_s_sfCatalog.iso_sid <> ''))) On ((this.`_oid` = this_z.`_oid`) AND (this_z.iso_sid <> '')) WHERE (this.iso_sid <> '') AND (this_z_s_sfCatalog.name = 'demande_d_inscription_a_la_cantine') AND (this_z.sfStatus = 0)) AS this", new Map(), (List) EC.newList(new List())).get("result")), "string", "html", "integer"); %>)