C# Notes

Help Doc For Dynamic ShowHideColumns Related to DataTables

Snippet Sample HTMl Snippet <div class=”dropdown showHideColumns” data-target=”mainTable1″>     <button class=”btn btn-primary dropdown-toggle” type=”button” data-toggle=”dropdown”>         <i class=”fa fa-gear”></i>         Show Hide Columns         <span class=”caret”></span>     </button>     <ul class=”dropdown-menu”></ul> </div> Here data-target=”mainTable1″ -> here mainTable1 represents the id for datatable Required Dependent JS Snippet function ShowHideColumn(target, colIndex) { var mTable = ‘#’ + target; var myDataTable = $(mTable).DataTable(); // Get the column API object var column = myDataTable.column(colIndex); // Toggle the visibility column.visible(!column.visible()); …

Help Doc For Dynamic ShowHideColumns Related to DataTables Read More »

EF Context CheckList

Normal General Processing Synchronous EF DB Context Data Insert EF DB Context Data Update EF DB Context Data Select EF DB Context Data Delete Bulk Processing Synchronous EF DB Context Data Insert EF DB Context Data Update EF DB Context Data Select EF DB Context Data Delete Normal General Processing Asynchronous EF DB Context Data …

EF Context CheckList Read More »

For Ajax Add Page

c# aspt.net controller part region url for ajax load blank form create async partiaviewresult action method load respective add form in partial view region url for ajax submit/save Create async JSONResult action method grab/get posted data save them to table if success return json with status true and data with recently added id if fail …

For Ajax Add Page Read More »

For Fixed Header Sample Code

<table class=”table table-striped table-fixed-header table-hover ” id=”reportContent “> <thead id=”pageHeader” class=”header”> <tr> <th colspan=”2″ width=”100px”>&nbsp;</th> <th width=”100px”>Ledger Code</th> <th>Ledger Name</th> <th width=”100px”>Debit</th> <th width=”100px”>Credit</th> </tr> </thead>

Basic Controller Variables

If controller is related to central only i.e it contains dbCore only it should inherit from BaseAsyncController If controller is related to Organisation also i.e it contains both dbCore and dbOrg it should inherit from BaseAsyncFOController While inheriting Any Controller from BaseAsyncController or BaseAsyncFOController, it should initialise base controller with respective variables also. eg For …

Basic Controller Variables Read More »