Soumettre la recherche
Mettre en ligne
Clase 23-04-12-lado del cliente
•
Télécharger en tant que DOCX, PDF
•
0 j'aime
•
451 vues
F
Fiorella071990
Suivre
Technologie
Signaler
Partager
Signaler
Partager
1 sur 9
Télécharger maintenant
Recommandé
Advanced Configuration Using LIMS Basic
Advanced Configuration Using LIMS Basic
Marcellius de Le
My Life
My Life
iluvridgebacks
Married filling jointly?
Married filling jointly?
yhruthannyneuzblanco
Presentación III cumbre ibérica sesión brainstorming
Presentación III cumbre ibérica sesión brainstorming
col.lab | collaboration laboratory
Editedslideshowdone
Editedslideshowdone
Jeanann Hand
Mi Programa de Formacion
Mi Programa de Formacion
amanda14carlosama6
Better Consumer Choices Vendor Management System
Better Consumer Choices Vendor Management System
Better Consumer Choices, LLC
Universidad técnica de ambato dia positivas
Universidad técnica de ambato dia positivas
marulachiqui
Recommandé
Advanced Configuration Using LIMS Basic
Advanced Configuration Using LIMS Basic
Marcellius de Le
My Life
My Life
iluvridgebacks
Married filling jointly?
Married filling jointly?
yhruthannyneuzblanco
Presentación III cumbre ibérica sesión brainstorming
Presentación III cumbre ibérica sesión brainstorming
col.lab | collaboration laboratory
Editedslideshowdone
Editedslideshowdone
Jeanann Hand
Mi Programa de Formacion
Mi Programa de Formacion
amanda14carlosama6
Better Consumer Choices Vendor Management System
Better Consumer Choices Vendor Management System
Better Consumer Choices, LLC
Universidad técnica de ambato dia positivas
Universidad técnica de ambato dia positivas
marulachiqui
Updated Restrictions PR
Updated Restrictions PR
Maria Kisyova
Ff
Ff
lct 77
Lípidos
Lípidos
critochoa
Misrac20150523
Misrac20150523
Kiyoshi Ogawa
Cara memasukan file dari slideshare ke blog
Cara memasukan file dari slideshare ke blog
budiotomo_08
جماليات الشعاب المرجانية في بحر الكويت
جماليات الشعاب المرجانية في بحر الكويت
kuwait dive team
Organizadamente taller didáctica
Organizadamente taller didáctica
Patricia Silva Casco
PRINCIPIOS Y FINES DE ETNOEDUCACION
PRINCIPIOS Y FINES DE ETNOEDUCACION
dalyluzacostarobles
My husbands mother is sick and he wants me to forclose on the house. Should I?
My husbands mother is sick and he wants me to forclose on the house. Should I?
bozfuarehnythkaylee
Cables
Cables
Oscar Lopez
Writing Sample UNC
Writing Sample UNC
Michael Shull
Horizon174
Horizon174
Brad Thilges, CFA, FRM
Contenu connexe
En vedette
Updated Restrictions PR
Updated Restrictions PR
Maria Kisyova
Ff
Ff
lct 77
Lípidos
Lípidos
critochoa
Misrac20150523
Misrac20150523
Kiyoshi Ogawa
Cara memasukan file dari slideshare ke blog
Cara memasukan file dari slideshare ke blog
budiotomo_08
جماليات الشعاب المرجانية في بحر الكويت
جماليات الشعاب المرجانية في بحر الكويت
kuwait dive team
Organizadamente taller didáctica
Organizadamente taller didáctica
Patricia Silva Casco
PRINCIPIOS Y FINES DE ETNOEDUCACION
PRINCIPIOS Y FINES DE ETNOEDUCACION
dalyluzacostarobles
My husbands mother is sick and he wants me to forclose on the house. Should I?
My husbands mother is sick and he wants me to forclose on the house. Should I?
bozfuarehnythkaylee
Cables
Cables
Oscar Lopez
Writing Sample UNC
Writing Sample UNC
Michael Shull
Horizon174
Horizon174
Brad Thilges, CFA, FRM
En vedette
(12)
Updated Restrictions PR
Updated Restrictions PR
Ff
Ff
Lípidos
Lípidos
Misrac20150523
Misrac20150523
Cara memasukan file dari slideshare ke blog
Cara memasukan file dari slideshare ke blog
جماليات الشعاب المرجانية في بحر الكويت
جماليات الشعاب المرجانية في بحر الكويت
Organizadamente taller didáctica
Organizadamente taller didáctica
PRINCIPIOS Y FINES DE ETNOEDUCACION
PRINCIPIOS Y FINES DE ETNOEDUCACION
My husbands mother is sick and he wants me to forclose on the house. Should I?
My husbands mother is sick and he wants me to forclose on the house. Should I?
Cables
Cables
Writing Sample UNC
Writing Sample UNC
Horizon174
Horizon174
Clase 23-04-12-lado del cliente
1.
MERINO ROMAN, Fiorella
Pierina Programando el Lado del Cliente VENTAS.BOL using System; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Data; usingSystem.Data.SqlClient; using VENTAS.DAL; namespace VENTAS.BOL { publicclassCategorias { privateint _IdCategoria; privatestring _Categoria; privatestring _Estado; publicintIdCategoria { get { return _IdCategoria; } set { _IdCategoria = value; } } publicstringCategoria { get { return _Categoria; } set { _Categoria = value; } } publicstring Estado { get { return _Estado; } set { _Estado = value; } }
2.
MERINO ROMAN, Fiorella
Pierina // Método para Insertar Registros publicstaticintInsertar(Categorias c) { try { DBAccessdb = newDBAccess(); db.AddParameter("@Categoria",c.Categoria); db.AddParameter("@Estado",c.Estado); SqlParameter p = newSqlParameter("@IdCategoria", SqlDbType.Int); p.Direction = ParameterDirection.Output; db.AddParameter(p); intnRes = db.ExecuteNonQuery("Proc_Insertar_Categoria"); if (nRes == 1) { returnint.Parse(p.Value.ToString()); } else { return -1; } } catch (Exception e) { throw; } } } } VENTAS.DAL using System; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Data; usingSystem.Data.SqlClient; namespace VENTAS.DAL { publicclassDBAccess : IDisposable { privateIDbCommandcmd = newSqlCommand(); privatestringstrConnectionString = ""; privateboolhandleErrors = false; privatestringstrLastError = ""; publicDBAccess() { strConnectionString = "Data Source=.;Initial Catalog=BD_Ventas;Integrated Security=True"; SqlConnectioncnx = newSqlConnection(); cnx.ConnectionString = strConnectionString; cmd.Connection = cnx;
3.
MERINO ROMAN, Fiorella
Pierina cmd.CommandType = CommandType.StoredProcedure; } publicIDataReaderExecuteReader() { IDataReader reader = null; try { this.Open(); reader = cmd.ExecuteReader(CommandBehavior.CloseConnection ); } catch (Exception ex) { if (handleErrors) strLastError = ex.Message; else throw; } catch { throw; } return reader; } publicIDataReaderExecuteReader(stringcommandtext) { IDataReader reader = null; try { cmd.CommandText = commandtext; reader = this.ExecuteReader(); } catch (Exception ex) { if (handleErrors) strLastError = ex.Message; else throw; } catch { throw; } return reader; } publicobjectExecuteScalar() { objectobj = null; try { this.Open();
4.
MERINO ROMAN, Fiorella
Pierina obj = cmd.ExecuteScalar(); this.Close(); } catch (Exception ex) { if (handleErrors) strLastError = ex.Message; else throw; } catch { throw; } returnobj; } publicobjectExecuteScalar(stringcommandtext) { objectobj = null; try { cmd.CommandText = commandtext; obj = this.ExecuteScalar(); } catch (Exception ex) { if (handleErrors) strLastError = ex.Message; else throw; } catch { throw; } returnobj; } publicintExecuteNonQuery() { int i = -1; try { this.Open(); i = cmd.ExecuteNonQuery(); this.Close(); } catch (Exception ex) { if (handleErrors) strLastError = ex.Message; else throw; }
5.
MERINO ROMAN, Fiorella
Pierina catch { throw; } return i; } publicintExecuteNonQuery(stringcommandtext) { int i = -1; try { cmd.CommandText = commandtext; i = this.ExecuteNonQuery(); } catch (Exception ex) { if (handleErrors) strLastError = ex.Message; else throw; } catch { throw; } return i; } publicDataSetExecuteDataSet() { SqlDataAdapter da = null; DataSet ds = null; try { da = newSqlDataAdapter(); da.SelectCommand = (SqlCommand)cmd; ds = newDataSet(); da.Fill(ds); } catch (Exception ex) { if (handleErrors) strLastError = ex.Message; else throw; } catch { throw; } return ds;
6.
MERINO ROMAN, Fiorella
Pierina } publicDataSetExecuteDataSet(stringcommandtext) { DataSet ds = null; try { cmd.CommandText = commandtext; ds = this.ExecuteDataSet(); } catch (Exception ex) { if (handleErrors) strLastError = ex.Message; else throw; } catch { throw; } return ds; } publicstringCommandText { get { returncmd.CommandText; } set { cmd.CommandText = value; cmd.Parameters.Clear(); } } publicIDataParameterCollection Parameters { get { returncmd.Parameters; } } publicvoidAddParameter(stringparamname, objectparamvalue) { SqlParameterparam = newSqlParameter(paramname, paramvalue); cmd.Parameters.Add(param); } publicvoidAddParameter(IDataParameterparam) { cmd.Parameters.Add(param);
7.
MERINO ROMAN, Fiorella
Pierina } publicstringConnectionString { get { returnstrConnectionString; } set { strConnectionString = value; } } privatevoid Open() { cmd.Connection.Open(); } privatevoid Close() { cmd.Connection.Close(); } publicboolHandleExceptions { get { returnhandleErrors; } set { handleErrors = value; } } publicstringLastError { get { returnstrLastError; } } publicvoid Dispose() { cmd.Dispose(); } } }
8.
MERINO ROMAN, Fiorella
Pierina VENTAS.UI using System; usingSystem.Collections.Generic; usingSystem.ComponentModel; usingSystem.Data; usingSystem.Drawing; usingSystem.Linq; usingSystem.Text; usingSystem.Windows.Forms; using VENTAS.BOL; namespace VENTAS4.UI { publicpartialclassForm1 : Form { public Form1() { InitializeComponent(); } privatevoid textBox1_TextChanged(object sender, EventArgs e) { } privatevoid Form1_Load(object sender, EventArgs e) { } privatevoid button1_Click(object sender, EventArgs e) { try { CategoriasobjCategoria = newCategorias(); objCategoria.Categoria = textBox2.Text; objCategoria.Estado = "1"; textBox1.Text = Categorias.Insertar(objCategoria).ToString(); MessageBox.Show("CategoríaInsertada", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.Message , "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } }
9.
MERINO ROMAN, Fiorella
Pierina Ingresamos una categoría Categoría Insertada Control de Categoría
Télécharger maintenant