示例#1
0
    protected void B_Crear_Click(object sender, EventArgs e)
    {
        UEmpleados          datos   = new UEmpleados();
        LUsuario            user    = new LUsuario();
        UUsuario            mensaje = new UUsuario();
        ClientScriptManager cm      = this.ClientScript;
        LUser us = new LUser();


        datos.Nombre     = TB_Nombre.Text.ToString();
        datos.Apellido   = TB_Apellido.Text.ToString();
        datos.Email      = TB_Email.Text.ToString();
        datos.Telefono   = TB_Celular.Text.ToString();
        datos.Cedula     = TB_Cedula.Text.ToString();
        datos.Id_Rol     = int.Parse(DDL_Rol.SelectedValue.ToString());
        datos.User_Name1 = TB_Usuario.Text.ToString();
        datos.Clave      = TB_Contrasena.Text.ToString();
        datos.Rclave     = TB_CConrasena.Text.ToString();
        datos.Puntos     = 0;
        datos.Session    = "a";
        datos.Sesiones   = 0;
        datos.Intentos   = 0;
        mensaje.Mensaje  = Session["men"].ToString();

        mensaje = user.insertarUsuario(datos, mensaje);
        this.RegisterStartupScript("mensaje", mensaje.Mensaje);
        DataTable regis   = user.ToDataTable(user.obtenerAu());
        String    esquema = "usuario";
        String    tabla   = "usuario";
        String    pk      = Session["user_id"].ToString();
        String    session = Session.SessionID;

        us.insert(regis, esquema, tabla, pk, session);
    }
    protected void B_Crear_Click(object sender, EventArgs e)
    {
        ClientScriptManager cm    = this.ClientScript;
        UEmpleados          datos = new UEmpleados();
        UUsuario            dato  = new UUsuario();
        LUsuario            user  = new LUsuario();
        UUser mensaje             = new UUser();
        LUser us = new LUser();



        datos.Nombre     = TB_Nombre.Text.ToString();
        datos.Apellido   = TB_Apellido.Text.ToString();
        datos.Email      = TB_Email.Text.ToString();
        datos.Telefono   = TB_Celular.Text.ToString();
        datos.Cedula     = TB_Cedula.Text.ToString();
        datos.Puntos     = 0;
        datos.Id_Rol     = 4;
        datos.User_Name1 = TB_Usuario.Text.ToString();
        datos.Clave      = TB_Contrasena.Text.ToString();
        datos.Rclave     = TB_CConrasena.Text.ToString();
        datos.Sesiones   = 0;
        datos.Intentos   = 0;
        datos.Session    = "a";

        dato.Mensaje   = Session["mensaje"].ToString();
        dato.Extension = Session["men1"].ToString();

        dato = user.insertUsuario(datos, dato);
        this.RegisterStartupScript("mensaje", dato.Mensaje);
        DataTable regis   = user.ToDataTable(user.obtenerAu());
        String    esquema = "usuario";
        String    tabla   = "usuario";
        String    pk      = "1";
        String    session = Session.SessionID;

        us.insert(regis, esquema, tabla, pk, session);

        //Response.Redirect(datos.Url);
    }