Ir al contenido principal

Entradas

C# Upload files

How to upload files to a server In the ASPX  <% using (Html.BeginForm(" UploadFile ", " AccessRequestProvider ",                     FormMethod.Post, new { enctype = "multipart/form-data" })) {%> Where  UploadFile  is the method and  AccessRequestProvider  is the controller (.cs) Then include the fields to upload the files  <input type="file" name="files" id="file1" class="filestyle" data-classbutton="btn btn-primary" data-input="false" data-classicon="icon-plus" data-buttontext="TEst.">                                                               <input type="file" name="files" id="file2" class="filestyle" data-buttonname="btn-primary" data-buttontext=" TEst."> Close the form  <%}  %> ...

C# - Connection to Active Directory

How create a connection to AD? Include in the References Define the variables server = company.se container = DC=compan,DC=se Create the connection              PrincipalContext pc = new PrincipalContext(ContextType.Domain, server, container);             DirectorySearcher directorySearcher = new DirectorySearcher(pc.ConnectedServer);             directorySearcher.Filter = "(sAMAccountName=" + signum + ")";             SearchResult results = directorySearcher.FindOne();             DataTable dtDomain = new DataTable("DomainP"); Parse the result if (results != null)             {                 dtDomain.Columns.Add("displayname");                 dtDomain.Columns.Add("departmen...

Bootstrap / Angularjs

How to pass parameters using $state $state.go('access_request2', { signum: request.Signum }); in the app.config -> .state('access_request2', {         url: "/access_request2/{signum}",         templateUrl: function ($stateParams) {             return 'AccessRequest2/' + $stateParams.signum;         },     })

Ionic - Fist Steps

First Steps to use Ionic Install   Node.j s Remember the installation path Review that in the System variable "PATH" appear the Node's intallation path, the Node installer automatically add it to the variable

Excel - Tricks

Import Data Select the option Data -> From Web Then select the data to import Functions FIND( caracter, cell) LEFT (cell, untilPosition) IF (condition, true condition, false condition) SUMIF( condition, equal value, value to add)

SQL Server - Tips II

Uso de CTE Especifica un conjunto de resultados temporal con nombre, conocido como expresión de tabla común (CTE).   Se deriva de una consulta simple y se define en el ámbito de ejecución de una sola instrucción SELECT, INSERT, UPDATE o DELETE.   Esta cláusula también se puede utilizar en una instrucción CREATE VIEW como parte de la instrucción SELECT que la define.   Una expresión de tabla común puede incluir referencias a ella misma.   Esto se conoce como expresión de tabla común recursiva. Ejemplo WITH Sales_CTE (SalesPersonID, NumberOfOrders) AS ( SELECT SalesPersonID, COUNT(*) FROM Sales.SalesOrderHeader WHERE SalesPersonID IS NOT NULL GROUP BY SalesPersonID ) SELECT AVG(NumberOfOrders) AS "Average Sales Per Person" FROM Sales_CTE ; GO Using multiple CTEs WITH Sales_CTE AS ( ) ,New CTE as ( ) select * from Sales_CTE , N ew CTE Using parameters DECLARE @ somevar DECIMAL ; WITH SomeName AS ( SELECT ....) SELE...