public STR_MSG exec(STR_MSG oMsg) { map = new CL_MAP(); //char status = (char)oMsg.Data[0]; //char prescription = (char)oMsg.Data[1]; //char hasRead = (char)oMsg.Data[2]; //int patientID = (int)oMsg.Data[3]; STR_MSG retour = map.CreerCommandeCliente(oMsg); object[] data = new object[] { oMsg.Data[0], retour.Data[0] }; // le nom de l'utilisateur + la commande this.iMsg = CL_MESSAGE_Factory.msg_factory("", data, "", "", "", true, ""); this.iMsg = CL_DATA_ACCES.ExecuteAndReturn(this.iMsg); // si la commande s'est créée correctement // on récupère l'ID de la commande if (this.iMsg.Info == "OK") { OracleParameterCollection ds = (OracleParameterCollection)this.iMsg.Data[0]; int ID_COMMANDE = int.Parse(ds["id"].Value.ToString()); data = new object[] { ID_COMMANDE }; this.iMsg = CL_MESSAGE_Factory.msg_factory("", data, "OK", "", "", true, ""); } return this.iMsg; }
public STR_MSG exec(STR_MSG oMsg) { map = new CL_MAP(); STR_MSG req = map.UnpaidOrder(oMsg); object[] data = new object[] { (string)oMsg.Data[0], (string)req.Data[0] } ; STR_MSG msg = CL_MESSAGE_Factory.msg_factory("", data, "", "", "", true, ""); this.oMsg = CL_DATA_ACCES.ExecuteAndReturn(msg); /* * if(((DataSet)this.oMsg.Data[0]).Rows.Count > 0) * { * data = new object[] { ((DataSet)this.oMsg.Data[0]).Rows.Count } ; * msg = CL_MESSAGE_Factory.msg_factory("", data, "", "", "", true, ""); * } * else * { * data = new object[] { 0 } ; * msg = CL_MESSAGE_Factory.msg_factory("", data, "", "", "", true, ""); * } * * * */ return this.oMsg; }
STR_MSG IWorkflow.exec(STR_MSG oMsg) { map = new CL_MAP(); STR_MSG retour = map.RecordMedic(oMsg); object[] data = new object[] { oMsg.Data[0], retour.Data[0] }; // le nom de l'utilisateur + la commande this.iMsg = CL_MESSAGE_Factory.msg_factory("", data, "", "", "", true, ""); this.iMsg = CL_DATA_ACCES.Execute(this.iMsg); return this.iMsg; }
public STR_MSG exec(STR_MSG oMsg) { // mappage map = new CL_MAP(); STR_MSG retour = map.ListMedic(oMsg); object[] data = new object[] { oMsg.Data[0], retour.Data[0] }; // le nom de l'utilisateur + la commande this.iMsg = CL_MESSAGE_Factory.msg_factory("", data, "", "", "", true, ""); this.iMsg = CL_DATA_ACCES.ExecuteAndReturn(this.iMsg); return this.iMsg; }
public STR_MSG exec(STR_MSG oMsg) { // mappage map = new CL_MAP(); //oMsg = map.Test(oMsg); //cad = new CL_DATA_ACCES(); // execution this.oMsg = CL_DATA_ACCES.Execute(oMsg); //cad.Execute(oMsg); this.oMsg = CL_MESSAGE_Factory.msg_factory("", this.oMsg.Data, this.oMsg.Info, "", "", true, ""); // retour return this.oMsg; }
public STR_MSG exec(STR_MSG oMsg) { map = new CL_MAP(); STR_MSG retour = map.SelectClientFromName(oMsg); object[] data = new object[] { oMsg.Data[0], retour.Data[0] }; // le nom de l'utilisateur + la commande this.iMsg = CL_MESSAGE_Factory.msg_factory("", data, "", "", "", true, ""); this.iMsg = CL_DATA_ACCES.ExecuteAndReturn(this.iMsg); if (this.iMsg.Info == "OK") { DataSet ds = (DataSet)this.iMsg.Data[0]; decimal id = (decimal)ds.Tables[0].Rows[0][0]; //int ID_CLIENT = 1; int ID_CLIENT = (int)id; data = new object[] { ID_CLIENT }; this.iMsg = CL_MESSAGE_Factory.msg_factory("", data, "OK", "", "", true, ""); } return this.iMsg; }
public STR_MSG exec(STR_MSG oMsg) { // exécute la vérification des droits (map) // ExecuteAndReturn map = new CL_MAP(); STR_MSG verif = map.VerifDroits(oMsg); // on récupère la requete formatée object[] data = new object[] { oMsg.Data[0], (OracleCommand)verif.Data[0] }; STR_MSG msg = CL_MESSAGE_Factory.msg_factory("", data, "", "", "", true, ""); this.oMsg = CL_DATA_ACCES.ExecuteAndReturn(msg); // lancement de la requete // Créer un objet data et le remplir avec la réponse de la procédure DataSet ds = (DataSet)this.oMsg.Data[0]; string value = (string)ds.Tables[0].Rows[0].ItemArray.GetValue(0); // on récupère le nom de son schéma, et donc, le nom de son type d'utilisateur this.oMsg = CL_MESSAGE_Factory.msg_factory("", new object[] { value }, "", "", "", true, ""); // renvoyer le résultat return this.oMsg; }
public STR_MSG exec(STR_MSG oMsg) { map = new CL_MAP(); STR_MSG req = map.ListStock(oMsg); object[] data = new object[] { (string)oMsg.Data[0], (string)req.Data[0] }; STR_MSG msg = CL_MESSAGE_Factory.msg_factory("", data, "", "", "", true, ""); this.oMsg = CL_DATA_ACCES.ExecuteAndReturn(msg); //stock = new CL_CT_CalculValeurStock(); //Thread thr = new Thread(new ParameterizedThreadStart(stock.Calcul)); //factu = new CL_CT_CalculFacturationDateDate(); // a refaire //Thread thr2 = new Thread(new ParameterizedThreadStart(factu.Calcul)); //{ // thr.Start(); // thr2.Start(); //} return this.oMsg; }
public STR_MSG exec(STR_MSG oMsg) { object[] data = new object[] { "C##PHARMAWEB", "PHARMA00" }; // données du compte faible STR_MSG msg = CL_MESSAGE_Factory.msg_factory("", data, "", "", "", true, ""); // pour la connexion avec le compte faible // Connect avec le compte faible STR_MSG verif = CL_DATA_ACCES.Connect(msg); // exécute la vérification des droits (map) // ExecuteAndReturn map = new CL_MAP(); verif = map.VerifDroits(oMsg); // on récupère la requete formatée data = new object[] { "C##PHARMAWEB", (OracleCommand)verif.Data[0] }; msg = CL_MESSAGE_Factory.msg_factory("", data, "", "", "", true, ""); this.oMsg = CL_DATA_ACCES.ExecuteAndReturn(msg); // lancement de la requete // Créer un objet data et le remplir avec la réponse de la procédure DataSet ds = (DataSet)this.oMsg.Data[0]; if (ds.Tables[0].Rows.Count > 0) { string value = (string)ds.Tables[0].Rows[0].ItemArray.GetValue(0); this.oMsg = CL_MESSAGE_Factory.msg_factory("", new object[] { value }, "", "", "", true, ""); } else { this.oMsg = CL_MESSAGE_Factory.msg_factory("", new object[] { "Utilisateur Inexistant" }, "", "", "", true, ""); } // Deconnexion du compte faible CL_DATA_ACCES.Disconnect(msg); // renvoyer le résultat return this.oMsg; }
public STR_MSG exec(STR_MSG oMsg) { // TODO vérification du niveau d'autorisation ? object[] data = new object[] { "PHARMAWEB", "Azerty64" }; // données du compte sys STR_MSG msg = CL_MESSAGE_Factory.msg_factory("", data, "", "", "", true, ""); // pour la connexion STR_MSG execution = CL_DATA_ACCES.Connect(msg); // Connexion avec sys if (execution.Info != "OK") { this.oMsg = CL_MESSAGE_Factory.msg_factory("", null, "Erreur", "", "", true, ""); return this.oMsg; } map = new CL_MAP(); execution = map.CreateUser(oMsg); data = new object[] { "PHARMAWEB", (OracleCommand)execution.Data[0] }; msg = CL_MESSAGE_Factory.msg_factory("", data, "", "", "", true, ""); STR_MSG retour = CL_DATA_ACCES.Execute(msg); // lancement de la requete // Deconnexion du compte sys CL_DATA_ACCES.Disconnect(msg); if (retour.Info != "OK") { this.oMsg = retour; } else { this.oMsg = CL_MESSAGE_Factory.msg_factory("", null, "OK", "", "", true, ""); } return this.oMsg; }