1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
using System;
using System.Data;
using System.IO;
using System.Configuration;
using System.Globalization;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.Sql;
using System.Data.SqlClient;
using Oracle.DataAccess.Client;
using System.Data.Common;
public partial class _Default : System.Web.UI.Page
{
//String appc_code;
String url;
String window_open;
String usercode;
String login;
String password;
//String string_connexion = "Data Source=AGILP;User Id=PSSOFT;Password=PSSAGILP1020;";
protected void Page_Load(object sender, EventArgs e)
{
usercode = Request.Params["code_usr"];
login = Request.Params["login"];
password = Request.Params["password"];
TEXTBOX_UTIL.Text = usercode;
//appc_code = this.VISA_CHOIX_APP.SelectedValue;
/*String selreq1 = "select TO_CHAR(c.id_combo_value) as NUM_ECRAN, des_oa as LIB ";
String fromsel1 = "from objetapp_usr, objetapp, oa_carac, csd_profile_templ_ticket_type c, password p ";
String wheresel1 = "where objetapp_usr.code_oa = objetapp.code_oa and oa_carac.code_oa = objetapp_usr.code_oa ";
String wheresel2 = "and objetapp_usr.code_usr = p.code_usr and p.csdp_code = c.id_profile and val_car1 = id_temp_form and code_cw = '0000000005' and objetapp_usr.code_usr = '" + this.TEXTBOX_UTIL.Text + "' ";
String sqlcom = selreq1 + fromsel1 + wheresel1 + wheresel2;
string strSQLconnection = "Data Source=AGILP;User Id=PSSOFT;Password=PSSAGILP1020;";
OracleConnection OConnexion = new OracleConnection();
OConnexion.ConnectionString = strSQLconnection;
// Ouverture de la connexion
OConnexion.Open();
OracleCommand cmd = new OracleCommand(sqlcom);
cmd.Connection = OConnexion;
OracleDataReader reader = cmd.ExecuteReader();
GRIDVIEW_CHOIX_APPS.DataBind();*/
//TEXTBOX2.Text = appc_code;
//this.VISA_CHOIX_APP.AutoPostBack = true;
//url = "/pssoft/itam/redir.aspx?target=ServiceManagementIncidentIncidentForm&EXTERNALINCIDENT=TRUE&code_usr=" + usercode + "&login=" + login + "&password=" + password + "&MODE=CREATEINCIDENTBYTYPE&AUTOFILLUSER=0&AUTOFILLCALLER=1&TICKETTYPE=" + appc_code;
window_open = "window.open('" + url + "')";
this.ButtonOK.Attributes.Add("onclick", window_open);
String selreq1 = "select TO_CHAR(c.id_combo_value) as NUM_ECRAN, des_oa as LIB ";
String fromsel1 = "from objetapp_usr, objetapp, oa_carac, csd_profile_templ_ticket_type c, password p ";
String wheresel1 = "where objetapp_usr.code_oa = objetapp.code_oa and oa_carac.code_oa = objetapp_usr.code_oa ";
String wheresel2 = "and objetapp_usr.code_usr = p.code_usr and p.csdp_code = c.id_profile and val_car1 = id_temp_form and code_cw = '0000000005' and objetapp_usr.code_usr = '" + this.TEXTBOX_UTIL.Text + "' ";
String sqlcom = selreq1 + fromsel1 + wheresel1 + wheresel2;
string strSQLconnection = "Data Source=AGILP;User Id=PSSOFT;Password=PSSAGILP1020;";
OracleConnection OConnexion = new OracleConnection();
OConnexion.ConnectionString = strSQLconnection;
// Ouverture de la connexion
OConnexion.Open();
OracleCommand cmd = new OracleCommand(sqlcom);
cmd.Connection = OConnexion;
OracleDataReader reader = cmd.ExecuteReader();
/*while (reader.Read())
{
this.SEL_COMPETENCES_COLL_SEL.Text = reader.GetString(0);
this.VG_NOM_COLL.Text = reader.GetString(0);
}*/
GRIDVIEW_CHOIX_APPS.DataSource = reader;
GRIDVIEW_CHOIX_APPS.DataBind();
OConnexion.Close();
}
} |