Posts

BreakPoints Are Not Working in Visual Studio

Solution Right-click on your project. Select [Properties]. Select the [Build] tab. Ensure [Define DEBUG constant] and [Define TRACE constant] are checked. Click the [Advanced] button at the bottom of the Build tabpage. Ensure that [Debug Info:] is set to [full]. Click [OK] and rebuild the project. Solution   Disable the "Just My Code" option in the Debug/General settings.

Gesture Recognizers with Xamarin.Forms

Why gestures ?   Some controls does not have support click event. In order to achieve add the below code this will enabling click event in the controls.. Gestures are mainly of 3 types Tap Gesture Recognizer Pinch Gesture Recognizer Pan Gesture Recognizer 1) Tap Gesture Recognizer var tapGestureRecognizer = new TapGestureRecognizer(); tapGestureRecognizer.Tapped += tapGestureRecognizer_Tapped; Controler_Name.GestureRecognizers.Add(tapGestureRecognizer); void tapGestureRecognizer_Tapped(object sender, EventArgs e) { ........//Code here } 2) Pinch Gesture Recognizer var pinchGestureRecognizer = new PinchGestureRecognizer(); pinchGestureRecognizer.PinchUpdated += pinchGestureRecognizer_PinchUpdated; Controler_Name.GestureRecognizers.Add(pinchGestureRecognizer); void pinchGestureRecognizer_PinchUpdated(object sender, PinchGestureUpdatedEventArgs e) { ........//Code here } 3) Pan Gesture Recognizer var panG

List all tables to be truncate

--Get the list of all the tables to be truncated   DECLARE @TablesToBeTruncated AS TABLE   (Id INT IDENTITY(1,1),TableObjectId INT , TableName SYSNAME,      SchemaId INT ) INSERT INTO @TablesToBeTruncated   SELECT ST.object_id,ST. name ,ST.schema_id   FROM sys.Tables ST   WHERE ST.type = 'U' AND ST. NAME NOT LIKE '#%'   AND ST. name <> 'sysdiagrams'   --AND ST.NAME NOT IN ('') -- Specify here the comma separated table names for which truncation is not required   --AND ST.NAME IN ('') -- Specify here the comma separated table names which needs to be truncated     --Generate the foreignkeys drop and create back script DECLARE @CreateScript AS NVARCHAR( MAX ), @DropScript AS NVARCHAR( MAX ) SELECT      ------------DROP SCRIPT--------------------      @DropScript = ISNULL (@DropScript, '' ) + 'ALTER TABLE ' + QUOTENAME(SCHEMA_NAME(Tlist.SchemaId)) + '.'       + QUOT

Export Table data into Excel

Html  <input type="button" id="btnExport" value=" Export Table data into Excel " /> <br/> <br/> <div id="dvData">     <table>         <tr>             <th>Column One</th>             <th>Column Two</th>             <th>Column Three</th>         </tr>         <tr>             <td>row1 Col1</td>             <td>row1 Col2</td>             <td>row1 Col3</td>         </tr>         <tr>             <td>row2 Col1</td>             <td>row2 Col2</td>             <td>row2 Col3</td>         </tr>         <tr>             <td>row3 Col1</td>             <td>row3 Col2</td>             <td>row3 Col3</a>             </td>         </tr>     </table> </div> Scripts Section $("#btnExport&qu

Lambda Query

What is a Lambda Expression?             A lambda expression is an anonymous function. It allows to write a method in the same place you are going to use it.  syntax : Parameters => Executed code. Basic Lambda Expression 1)Where List< int> mark = new List< int> {90, 71, 82, 93, 75, 82 }; var result= mark.Where(n => n > 80); Console.WriteLine( "Values greater than 80 are" );  foreach(val item in result) {  Console.WriteLine( "{0}" , item );  } // Outputs:  // Value greater than 80 are // 90 // 82 // 93 // 82 2)Count() int result= mark.Where(n => n > 80).Count() ; Console.WriteLine( "{0} markare greater than 80" , result);   // Outputs:  // 4 mark are greater than 80   3)Sum()   int result= mark.Where(n => n > 80).Count() ; Console.WriteLine( "{0} markare greater than 80" , result);     // Outputs:  // Sum of mark greater than 80 are // 347

NuGet - Common Database Settings

NuGet Common Database Settings Step 1:  get the nuget package https://www.nuget.org/packages/CommonDatabaseSettings Step 2: Make a object for DataBase class. (you can see many Method ) Call the method named CheckDatabaseConnection . Note : you can get the connection sting by calling DataBase.ConnectionString That's all, select which type of database to be connected. More over there are many methods in the BataBase class. Function Description Return type GetConnectionString(string) Set the database connection string void CheckDatabaseConnection(string) Check the connection string existing or not bool CheckDataExist(string) Check the data is present in the table bool DropdownFill(string) Fill the a Dropdown DataTable ExecuteDB(string) Can insert, update and delete data in the database void GetData(string) Get a strin

CRUD - Basic functions of a computer database

In Comuter Database CRUD means Create , Read, Update and Delete are the four basic functions of persistent storage . Sometimes called SCRUD with an "S" for Search. Operation SQL Create INSERT Read (Retrieve) SELECT Update (Modify) UPDATE Delete (Destroy) DELETE