Skip to main content

Posts

Showing posts from August, 2015

Create Queue SQL Server 2012

Create Queue SQL Server 2012 -- ============================================= -- CREATE QUEUES FOR SERVICE BROKER -- ============================================= CREATE QUEUE   < QUEUE - NAME , SYSNAME , TEST_QUEUE >    WITH    STATUS = ON ,    RETENTION = OFF ,    ACTIVATION (               STATUS = ON ,               PROCEDURE_NAME = < PROC - NAME , SYSNAME , TEST_PROCEDURE > ,               MAX_QUEUE_READERS = < MAXREADERS , INT , 1 >,               EXECUTE AS < EXECUTE - OPTIONS ,, SELF > ),    POISON_MESSAGE_HANDLING ( STATUS = ON )    ON < FILEGROUP ,, [DEFAULT] > -- ============================================= -- CHECKING QUEUES -- ============================================= SELECT * FROM SYS . SERVICE_QUEUE_USAGES

SQL SERVER TOTAL ROWS / COLUMN COUNT

GET TOTAL ROWS COUNT OF A TABLE SELECT COUNT (*) as TOTAL_TBL_ROWS FROM [ORDER] GET TOTAL COLUMNS COUNT OF TABLE SELECT COUNT (*) as TOTAL_TBL_COLUMNS FROM INFORMATION_SCHEMA . COLUMNS WHERE TABLE_NAME = 'ORDER' OR SELECT COUNT (*) AS TOTAL_TBL_COLUMNS FROM INFORMATION_SCHEMA . COLUMNS        WHERE TABLE_CATALOG = 'MDM'             AND TABLE_SCHEMA = 'dbo'             AND TABLE_NAME = 'ORDER'

Windows Authentication in MVC4 with IIS Express

Hello everyone, I am going to share the about Windows Authentication in MVC4 with IIS Express or How to enable to Windows Authentication in MVC4   Web Application (projects) with IIS Express. Just follow the few steps to windows authentication in MVC4 Web Application as given below. Step 1 : In the First step, you create MVC4 Web Application. Step 2 : Open MVC4 Web Application web config file for few modification for windows authentication. i) Comment the code for form authentication section in system.web section.  i.e.     <!-- <authentication mode="Forms">       <forms loginUrl="~/Account/Login" timeout="2880" />     </authentication> --> j) Add the authentication mode is Windows .  i.e.    < authentication mode = " Windows " ></ authentication > Step 3 : Added to application Settings in the appSettings section. i.e.     < add key = " autoForm

How to get values from formcollection in asp.net mvc 4?

Hello everyone, I am going share the code sample to get values from formcollection in mvc 4  and all the detail as given below. Update Devices Controller code for update Devices using FormCollection . // POST: /Devices/Edit/id [ HttpPost ] public ActionResult Edit( long id, FormCollection collection) {     try     {         Devices deviceItem = new Devices ();         DeviceRepository RepoDevice = new DeviceRepository ();         deviceItem.OrderID = id;         deviceItem.CustomerID = Convert .ToInt64(collection[ "CustomerID" ]);         deviceItem.Customer = collection[ "Customer" ];         deviceItem.User = collection[ "User" ];         deviceItem.OrderChannel = collection[ "OrderChannel" ];         deviceItem.IMEI = collection[ "IMEI" ];                      RepoDevice.UpdateDevice(deviceItem.OrderID, deviceItem.CustomerID, deviceItem.Customer, deviceItem.User, deviceItem.OrderChannel

AngularJs ng-mouseup events

The AngularJs ng- mouseup is use to specify the mouseup event features. The demo link click to view http://embed.plnkr.co/SKvAaI/preview The HTML code-sample: < button type ="button" ng-mouseup ="mouseup(IsDisplay)"> NG-MOUSEUP </ button > The AngularJs code-sample: var app = angular.module( 'myApp' , []); app.controller( 'ngMouseupCtrl' , [ "$scope" , function ($scope) {     $scope.domain = "code-sample.com" ;     $scope.IsDisplay = false ;     $scope.mouseup = function (clicked) {         alert( "My mouseup function is called." );         $scope.IsDisplay = clicked == true ? false : true ;     }; }]); The AngularJs and HTML code-sample: < !DOCTYPE html > < html > < head >     < meta charset ="utf-8" />     < title > angularjs ng-mouseup </ title >     < script src ="https://code.angular