Exemple #1
0
        public void InsertOperacion(E_Operacion ObjOperacion)
        {
            SqlDatabase SqlClient = new SqlDatabase(connectionString);

            DbConnection tCnn;

            tCnn = SqlClient.CreateConnection();
            tCnn.Open();

            DbTransaction tran = tCnn.BeginTransaction();

            try
            {
                DbCommand SqlCommand = SqlClient.GetStoredProcCommand("[Almacen].[Usp_InsertOperacion]");
                SqlClient.AddInParameter(SqlCommand, "@OperacionID", SqlDbType.Char, ObjOperacion.OperacionID);
                SqlClient.AddInParameter(SqlCommand, "@Descripcion", SqlDbType.VarChar, ObjOperacion.Descripcion);

                SqlClient.ExecuteNonQuery(SqlCommand, tran);

                tran.Commit();
                tCnn.Close();
                tCnn.Dispose();
                SqlCommand.Dispose();
            }
            catch (Exception ex)
            {
                tran.Rollback();
                throw new Exception(ex.Message);
            }
        }
Exemple #2
0
        public void UpdateOperacion(E_Operacion ObjOperacion, string Tipo)
        {
            CD_Kardex ObjCD_Kardex = new CD_Kardex(AppSettings.GetConnectionString);

            ObjCD_Kardex.UpdateOperacion(ObjOperacion, Tipo);
        }
Exemple #3
0
        public void InsertOperacion(E_Operacion ObjOperacion)
        {
            CD_Kardex ObjCD_Kardex = new CD_Kardex(AppSettings.GetConnectionString);

            ObjCD_Kardex.InsertOperacion(ObjOperacion);
        }
Exemple #4
0
 private void ObtenerDatosControles()
 {
     ObjOperacion             = new E_Operacion();
     ObjOperacion.OperacionID = TxtOperacionID.Text;
     ObjOperacion.Descripcion = TxtDescripcion.Text;
 }