Eg Net Solution

Eg Net Solution

Here in this sites web and software developer can get some essential information.

Breaking

MY Favorite .Net Question For Interview

This are not tidy. Just for rough. In Sha Allah will make it tiddy soon. 1.  DateTime2 Date range 0001-01-01 through 9999-12-31  vs Date...

Tuesday, April 16, 2019

Solved Problem :: Scenario While Hosting ASP MVC4 Application in IIS 6.1 at Windows Server 2012 R2

April 16, 2019 0
Solved Problem :: Scenario While Hosting ASP MVC4 Application in IIS 6.1 at Windows Server 2012 R2
How To Install IIS on Server 2012 r2
https://www.youtube.com/watch?v=mPwlxP5Nxcg&t=146s
Install .Net Framework 4.5.2 from Microsoft Web Platform Installer

https://stackoverflow.com/questions/37557199/how-to-troubleshoot-a-503-error-in-iis
https://stackoverflow.com/questions/8232922/asp-pages-in-iis-using-localhost-401-3-error-do-not-have-permission
https://stackoverflow.com/questions/18981118/http-error-403-14-forbidden-the-web-server-is-configured-to-not-list-the-con
https://stackoverflow.com/a/4794716/2014745
https://stackoverflow.com/questions/34199976/iis-config-error-this-configuration-section-cannot-be-used-at-this-path
https://stackoverflow.com/a/35332431/2014745
https://stackoverflow.com/questions/9794985/config-error-this-configuration-section-cannot-be-used-at-this-path
https://stackoverflow.com/a/25698312/2014745
https://stackoverflow.com/questions/2659544/cant-run-asp-net-mvc-2-web-app-on-iis-7-5
https://stackoverflow.com/questions/18981118/http-error-403-14-forbidden-the-web-server-is-configured-to-not-list-the-con/50863817
https://www.codeproject.com/Questions/1076591/A-default-document-is-not-configured-for-the-reque
https://stackoverflow.com/a/12867753/2014745
https://stackoverflow.com/questions/19162553/iis-401-3-unauthorized
https://stackoverflow.com/questions/32014912/how-do-i-tell-iis-to-serve-static-files-from-the-web-root-with-an-underlying-cat/32526842
https://stackoverflow.com/questions/8723763/iis-6-0-suddenly-shows-directory-listing-instead-of-mvc-3-app
https://stackoverflow.com/questions/13162545/handler-extensionlessurlhandler-integrated-4-0-has-a-bad-module-managedpipeli?rq=1
https://stackoverflow.com/questions/4654547/a-default-document-is-not-configured-for-the-requested-url-and-directory-browsi
https://stackoverflow.com/q/40428074/2014745
https://stackoverflow.com/questions/45207154/could-not-load-file-or-assembly-microsoft-reportviewer-processingobjectmodel-v#
https://stackoverflow.com/questions/33412042/configuration-error-related-to-targetframework-in-web-config/33412841#33412841
https://stackoverflow.com/questions/40428074/iis-7-5-only-shows-directory-list-or-403-instead-of-asp-net-application
https://stackoverflow.com/questions/1376717/unable-to-make-the-session-state-request-to-the-session-state-server
https://stackoverflow.com/questions/9216158/the-requested-page-cannot-be-accessed-because-the-related-configuration-data-for

Regards ---Muhammad Ashikuzzaman

Wednesday, March 13, 2019

My Favorite Attar/ Fragrant list

March 13, 2019 0
My Favorite Attar/ Fragrant  list
                     Attar name                             Company Name       
                     Al-Fares                                   Al-Rehab
                     Sultan                                       Al-Rehab
                     Dalal                                         Al-Rehab
                     Sad Safa                                   Al-Rehab
                     Shadha                                     Al-Rehab
                     Choko Mask                            Al-Rehab
                     Soft                                           Al-Rehab
                     Lord                                         Al-Rehab
                     White Wood                            Al-Rehab
                     Black Wood                             Al-Rehab
                     Cute Blue bottle                      Tibbet
                     Fawakih                                   Opened
                     Orange                                     Alif
                     Lemon                                      Opened
                     kachi Beli                                 Opened
                     Magnet                                     Opened
                     Marjan                                     Opened/Company 
                     Jannatul Fedaus                      Opened/Company 



Regards ---Muhammad Ashikuzzaman

Thursday, December 27, 2018

SQL TRICKS

December 27, 2018 0
SQL TRICKS
1. Student Table have:ID, STUDENT_ID, STUDENT_NAME, YEAR, CLASS, ROLL
Find each student  name, the last year in database, class  name

  1. ID, STUDENT_ID    STUDENT_NAME  YEAR   CLASS   ROLL
  2. 1          2                           A                           2010       I             5
  3. 2          2                           A                           2012      III           5
  4. 3          5                          C                           2010      IX           5
  5. 4          2                           A                           2014      V             5
  6. 5          7                           E                           2018      IX           5
  7. 6          2                           A                           2016      VII          5
   Query: 
  1.      Select ST1.ID, ST1.STUDENT_ID, ST1.STUDENT_NAME, ST1.YEAR, ST1.CLASS, ROLL from STUDENT ST1 INNER JOIN
  2.   (
  3.      SELECT  STUDENT_ID ,  MAX(YEAR)  MAXYEAR from STUDENT GROUP BY  STUDENT_ID    
  4.    )
  5.    ST2 on ST1.STUDENT_ID     = ST2.STUDENT_ID    AND ST1.ID = ST2.ID

Monday, December 24, 2018

RDLC Report Definition Language Client Site Snippet

December 24, 2018 0
RDLC Report Definition Language Client Site Snippet
1. FormatDateTime to required Format

  1. =FormatDateTime(Fields!OrderDate.Value, DateFormat.ShortDate)
  2. =Format(now( ),"dd-MMM-yyyy HH:mm:ss tt")
  3. =Format( Fields!CreateDate.Value, "dd-MMM-yyyy")
  4. =FormatNumber(Sum(Fields!FinishQty.Value),0)
  5. =FormatDateTime(Fields!DeliveryDate.Value, DateFormat.ShortDate) 

        For Printing Serial In RDLC
  1. =RowNumber(Nothing)
     If Condition in RDLC
     =IIf(Parameters!UnitListId.Value = "6", "Color City Ltd.",                       
            IIf(Parameters!UnitListId.Value = "1", "Mymun Textile Ltd.", 
                 IIf(Parameters!UnitListId.Value = "2", "Hamza  Textile Ltd",
                       "Mymun Complex")))
    Switch case in RDLC
        = Switch( Fields!FlagGroup.Value =  0, "00-60 days",
          Fields!FlagGroup.Value =  1, "61-120 Days",
          Fields!FlagGroup.Value =  2, "121-180 Days",
          Fields!FlagGroup.Value =  3, "181-270 Days",
          Fields!FlagGroup.Value =  4, "271-365 Days",
          Fields!FlagGroup.Value = 5,  "More than 365 Days" ,

  1 = 1,                          "default value" )
   Formatting number to Desired Decimal Points:
    =FormatNumber(Sum(Fields!FinishQty.Value), 0)

  Iff condition in Function: 
   =FormatNumber( Sum(IIf(Fields!FlagColumn = 0, Fields!FinishQty.Value ,0 )    ),0)
   =IIf(Fields!FlagColumn = 0, FormatNumber( Sum(Fields!FinishQty), 0),0 )



Tuesday, November 27, 2018

Programming language & library Exceptions that occurred while developing in C#, JavaScript, Jquery, SQL, Entity framework

November 27, 2018 0
Programming language & library Exceptions that occurred while developing in C#, JavaScript, Jquery, SQL, Entity framework
C#-SQL: Procedure or function SPROC_GET_DBTEXQuality_SearchBatchCardDetails has too many arguments specified. 
It occurs when System.Data.SqlClient SqlCommand command.Parameters have more parameter rather than declared in the Stored procedure

Parse String to Date Time: Worked For ME:
   string CreatedDateStr = "2018-12-13 11:05:45.313";
   DateTime CreateDate = DateTime.Parse( CreatedDateStr );

Thursday, November 1, 2018

Using SqlClient connect to sql server and CRUD in Databse thorough Stored Procedure

November 01, 2018 0
Using SqlClient  connect to sql server and CRUD in Databse thorough Stored Procedure

  1.   public List<LDNo> LDNoList(Int64? LDNo)
  2.         {

  3.             ResultModel result = new Models.ViewModel.CommonViewModel.ResultModel();
  4.             string error = String.Empty;
  5.             QUERY2 query = new QUERY2();
  6.             Dictionary<string, object> dict = new Dictionary<string, object>();//= new Dictionary<string, string> 
  7.             List<LDNo> ldnoList = new List<LDNo>();

  8.             dict.Add("@LDNO", LDNo);
  9.             dict.Add("@Result", 1.ToString());
  10.             dict.Add("@Message", "Message".ToString());
  11.             query.SQL = @"SPROC_GET_tblDyesForecastingHead_LDNO";
  12.             query.PARAMETER = dict;
  13.             clsDataprocess cls = new clsDataprocess();
  14.             result = cls.ExecuteSqlStoredProcedureSaveEdit(query, "get", out error);
  15.             if (result.Result && result.DtTable != null && result.DtTable.Rows.Count > 0)
  16.             {
  17.                 Int64 tempi = 0;
  18.                 for (int i = 0; i < result.DtTable.Rows.Count; i++)
  19.                 {
  20.                     LDNo lDNo = new LDNo();
  21.                     Int64.TryParse(result.DtTable.Rows[i]["LDNO"].ToString(), out tempi);
  22.                     lDNo.LdNo = tempi;
  23.                     ldnoList.Add(lDNo);

  24.                 }
  25.                 string Message = result.Message;
  26.                 string Result = result.Result.ToString();
  27.             }
  28.             else if (!result.Result)
  29.             {
  30.                 throw new Exception(result.Message);
  31.             }

  32.             return ldnoList;
  33.         }

Thursday, October 18, 2018

Programming Or Algorithms Snippet

October 18, 2018 0
Programming Or Algorithms Snippet
1. Swap value of 2 variable with out using any third variable.
Suppose

  1.  a= 5
  2.  b = 7
  3.  a = a + b;  = 12;
  4.  b =  a - b ;  =  5;
  5.  a = a -b; = 7

 You can also swap two equal length array with out using any temporary third variable by looping and traversing the arrays. 

Tuesday, October 9, 2018

C# Snippet

October 09, 2018 0
C# Snippet

1. Formatting Date-time:  string.Format("{0:dd/MM/yy}", DateTime.Today)
2. Storing List Data in ViewBag and retrieve the List Data in View Or Getting List Data From ViewBag :

3. If you want to pass multiple different list in a View from ASP .Net MVC Controller Action How can you pass it?
Answer: 
In Action:  ViewBag.MyClassList = new List<MyClass>() ;
 List<MyClass> MyClassList = ViewBag.MyClassList as List<MyClass>;

Returning JSON Data From Server To Client :: 
  1.  var data = obj_dal.LoadAllProductCode(TKTCode, "1", allMenu.User.USER_ID.ToString());    
  2.             var MaxJson = Json(new { ListProductCode = data});
  3.             MaxJson.MaxJsonLength = 999999999;
  4.             return MaxJson;
Or
  1. var MaxJson =   Json(new { ListOrderBooking = obj_dal.LoadOrderBookingDL(OrderNo, allMenu.User.EMPLOYEE_ID.ToString()) });
  2. MaxJson.MaxJsonLength = 999999999;
  3. return MaxJson;

SQL Snippet

October 09, 2018 0
SQL Snippet

Select multiple columns from a subquery in Select Statement with SQL Server Or Use OF Outer Apply

  1. SELECT t1.ID, t1.fck, t1.f1, t3.f2, t3.f3
  2. FROM tbl1 AS t1
  3. OUTER APPLY (
  4. SELECT f2, f3 
  5. FROM tbl2 AS t2 
  6. WHERE t2.ID = t1.fck) AS t3



Decaaring table as Variable And Inserting In it:

  1. declare @listOfTablesArrangementIDs table (id int);  
  2. insert @listOfTablesArrangementIDs(id) values(1),(2),(3) 
  3. insert @listOfTablesArrangementIDs(id) values(2027),(20258),(7)  
  4. select  * from TablesArrangement where ID NOT IN (select * from @listOfTablesArrangementIDs ) AND AreaCode = 'tst1'



Create Trigger
  1.  -- ============================================= 
  2.  -- Author: <Muhammad Ashikuzzaman,,Name> 
  3.  -- Create date: <24-10-2018,,> 
  4.  -- Edit date: <14-08-2018, > 
  5.  -- Description: <Initial server: 192.168.153.208 > 
  6.  -- ============================================= 
  7.  CREATE TRIGGER [ccl2].[TRG_TBL_PriceSetup] 
  8.  ON [ccl2].[TBL_PriceSetup] 
  9.  AFTER UPDATE 
  10.  AS 
  11.  BEGIN 
  12.  -- SET NOCOUNT ON added to prevent extra result sets from 
  13.  -- interfering with SELECT statements. 
  14.  SET NOCOUNT ON; 
  15.  --Declare @PriceID bigint 
  16.  --Select @PriceID = PriceID From deleted 
  17.  
  18.  insert into ccl2.ARC_PriceSetup (PriceID,Price) 
  19.  select PriceID,Price from deleted 
  20.  END
Create A Stored Procedure


  1. USE [ProjectInfoDB]
  2. GO
  3. /****** Object:  StoredProcedure [dbo].[SPROC_GET_tblDyesForecastingHead_LDNO]    Script Date: 11/1/2018 12:44:51 PM ******/
  4. SET ANSI_NULLS ON
  5. GO
  6. SET QUOTED_IDENTIFIER ON
  7. GO
  8. -- =============================================
  9. -- Author: <Muhammad Ashikuzzaman,,Name>
  10. -- Create date: <14-08-2018,,>
  11. -- Edit date: < ,,>
  12. -- Description: <Initial server: 192.168.153.208 ,,>
  13. -- =============================================
  14.  ALTER PROCEDURE [dbo].[SPROC_GET_tblDyesForecastingHead_LDNO] 
  15.  @LDNO bigint = null, 
  16.  @Result  bit =1 out ,
  17.  @Message  nvarchar(200) = 'ok' out   
  18.   
  19.  AS
  20. BEGIN
  21.   
  22. SET NOCOUNT ON;

  23. --select top 50  CommonId_For_ForeCastingDetails, DyeingPart, DyesID  from dbo.tblDyesForecastingDetail

  24.  select DISTINCT  LDNO  from dbo.tblDyesForecastingHead 
  25.  where   Convert(nvarchar(50), LDNO) like '%'+ Convert(nvarchar(50), ISNULL(@LDNO, LDNO) ) +'%'

  26.  --select top 50  CommonId_For_ForeCastingDetails, DyeingPart, DyesID  from dbo.tblDyesForecastingDetail

  27.  If (@@ERROR<>0)
  28. Begin
  29. set @Result = 0
  30. set @Message = 'Failed to Retrieve, Try Again'
  31. End
  32. Else
  33. BEGIN
  34.      set @Result = 1
  35.      set @Message = 'Data was Retrieved successfully'
  36. END
  37. END
Create a Cursor and traverse selected row through this cursor

  1. declare @Test table (Id int, Col1 int, Col2 int, Col3 int)
  2. insert into @Test (Id , Col1 , Col2 , Col3 )
  3. values  (1 , 1 , 1 , 40 ),
  4.             (2 , 1 , 1 , 41 ), 
  5.             (3 , 1 , 1 , 41 ),
  6.             (4 , 1 , 1 , 42 ),
  7.             (5 , 1 , 2 , 40 ),
  8.             (6 , 1 , 3 , 41 )
  9.  
  10.           declare @Id bigint
  11.           declare @col1 int 
  12.            declare @col2 int 
  13.            declare @col3 int  
  14.            declare @CtnInfo cursor  
  15.            set @CtnInfo = CURSOR FOR  
  16.            SELECT Id, COL1, COL2, COL3 FROM @Test  
  17.            declare @tblBody nvarchar(max) 
  18.            set @tblBody= 'Start : '  
  19.            OPEN @CtnInfo  
  20.            SELECT @@FETCH_STATUS as FETCH_STATUS1 
  21.            WHILE 1 = 1 
  22.            BEGIN  
  23.            FETCH NEXT FROM @CtnInfo INTO
  24.                                                      @id, @col1, @col2, @col3 

  25.            IF @@FETCH_STATUS = -1 
  26.            Break 
  27.            Else  
  28.            SET @tblBody=@tblBody+ ', ' + convert(nvarchar(20), @Id) 
  29.            END  
  30.            CLOSE @CtnInfo 
  31.            DEALLOCATE @CtnInfo  
  32.            SELECT @@FETCH_STATUS as FETCH_STATUS2 
  33.            select @tblBody as TotalSelecteddata
   


Understanding partition by 
  1. -- My understanding partition by will count seqs increasingly until partition  by column value remain unchanged
  2.     declare @Test table (id int, Col1 int, Col2 int, Col3 int)
  3.     insert into @Test (id , Col1 , Col2 , Col3 )
  4.     values (1 , 1 , 1 , 40 ),
  5.     (1 , 1 , 1 , 41 ),
  6.     (1 , 1 , 1 , 41 ),
  7.     (1 , 1 , 1 , 42 ),
  8.     (1 , 1 , 2 , 40 ),
  9.     (1 , 1 , 3 , 41 ),
  10.     (1 , 1 , 3 , 41 ),
  11.     (2 , 1 , 4 , 43 ),
  12.     (2 , 2 , 1 , 43 ),
  13.     (2 , 2 , 1 , 44 ),
  14.     (2 , 2 , 2 , 44 ),
  15.     (2 , 2 , 3 , 44 ),
  16.     (2 , 2 , 4 , 45 ),
  17.     (3 , 3 , 1 , 46 ),
  18.     (4 , 3 , 2 , 46 ),
  19.     (5 , 3 , 2 , 47 )
  20. -- Normal Group BY
  21.     select col1, col2 , count(Col1) Col1Count, count(Col2) Col2Count
  22.     from @Test
  23.     group by col1, col2 order by Col1

  24. --partition BY With Group BY
  25. -- My understanding partition by will count seqs increasingly untill partition by column value remain unchanged
  26.     select col1, col2, col3, count(col3)Col3Count, row_number()
  27.     over (Partition BY col1 , col2
  28.     order By col1 ) seqs
  29.     from @Test
  30.     group by col1, col2, col3
  31.     order by col1, col2




Remove Time portion from a date time
select DATEADD(DD, DATEDIFF(dd, 0, '2018-12-25 12:25:00'  ), 0)-- will remove time  portion from the date

 select DATEDIFF(dd, 0, '2018-12-25 12:25:00'  )  here 2nd parameter   0 means  '1900-01-01'


Tuesday, September 11, 2018

ASP .NET MVC 5 Multi Tenant Example With New Project (Single Different Database For Per Tenant Using Entity Framework)

September 11, 2018 0
ASP .NET MVC 5 Multi Tenant Example With New   Project (Single Different Database For Per Tenant Using Entity Framework)

In the name of Allah, Most Gracious, Most Merciful بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم

Welcome to Hamdoon Soft Fun: 
Here I just use this ASP .Net MVC5 application as Multitenant application with single database per tenant 
I am doing it from Windows 10 .

All code and supports can achieved from here https://www.fiverr.com/ashikcse20 

And video is here : 

A. Technical Steps: 
1. Go to C:\Windows\System32\drivers\etc open hosts file with Sublime Text or Notepad with administarator mode. find # 127.0.0.1 localhost and replace it by the following instruction. 
# In hosts file a line starting with # is a comment line #The below line is an active line which make many alias of local host (remove the #) 127.0.0.1 localhost hamdoonsoft.com tenant1.hamdoonsoft.com tenant2.hamdoonsoft.com tenant3.hamdoonsoft.com 


Thursday, August 16, 2018

Jquery Code Snippet

August 16, 2018 0
Jquery Code Snippet
Use Of :not(), :not, :nth-child()
Note that since JavaScript arrays use 0-based indexing, these selectors reflect that fact. This is why $( ".myclass:eq(1)" ) selects the second element in the document with the class myclass, rather than the first. In contrast, :nth-child(n)uses 1-based indexing to conform to the CSS specification.
ecause jQuery's implementation of :nth- selectors is strictly derived from the CSS specification, the value of n is "1-indexed", meaning that the counting starts at 1. For other selector expressions such as :eq() or :even jQuery follows JavaScript's "0-indexed" counting. Given a single <ul> containing two <li>s, $( "li:nth-child(1)" ) selects the first <li> while $( "li:eq(1)" ) selects the second.
https://api.jquery.com/nth-child-selector/ 
https://api.jquery.com/eq-selector/ 
$("#table4 tr:not(:last,:first,#table4-first-tr, :nth-child(2) )").remove(); 

Check If A Checkbox Is Checked With jQuery 

// Trigger checkbox click on it's parent click

  1. $("body").on("click", ".checkbox-td", function (event) {
  2.             debugger;
  3.             $(':checkbox', this).trigger('click');
  4.             event.stopPropagation(); 
  5.         }); 

If checkbox is checked or not

  1. if (jQuery(this).is(':checked')) { }
  2. else if (jQuery(this).is(':not(:checked)')) { }
When testing local server ajax was working fine. But when put in http://192.168.153.253/ERP/ ajax wasn't working.
get that ERP was added and for the shake a base url is needed.

  1. <script type="text/javascript"> 
  2.         var base = '@Url.Content("~/")';
  3. </script>

jQuery track when #Mymodal is colosed

  1. $('#myModal').on('hidden.bs.modal', function (e) {})
  2. jQuery Delaying While Removing/Adding CSS
  3. setTimeout(function () {
  4. ClickedTd.css("border", "0px solid green");
  5. }, 2000);

#Remove checkbox with delay one by one:  First one work. If I put  check box in setTimeout then it will refer  $(this) = wind function and checkbox aren't removed
  1.                var i = 0;
  2.                 $(".checkbox-td .ckbox:checkbox:not(:disabled)").each(function () {
  3.                     i++;
  4.                     var chkbox = $(this);
  5.                     setTimeout(function () {
  6.                         chkbox.remove();
  7.                     }, 1000 - 100 * i);
  8.                 });
  9.                 i = 0;
  10.                 $(".checkbox-td .ckbox:checkbox:not(:disabled)").each(function () {
  11.                     i++;
  12.                     setTimeout(function () {
  13.                         $(this).remove();
  14.                     }, 1000 - 100 * i);
  15.            });

# Juquery $.Ajax  Jquery Ajax Method  with object variable as data

  1.  //dyes_forecasting.ForecastingHead = dyes_forecasting_head_list;
  2. //dyes_forecasting.DyesRecipe = dyes_recipe_list;
  3. //var data = "{'model':" + JSON.stringify(dyes_forecasting) + "}";
  4. function LoadList() {
  5.     var jdata = PrepearJasonData('filter-item');
  6.     //alert(JSON.stringify(jdata));
  7.     WaitMeStart();
  8.     $.ajax({
  9.         type: 'POST',
  10.         url: '/tablessetup/List',
  11.         contentType: "application/json; charset=utf-8",
  12.          data: JSON.stringify(jdata),
  13.        // data: JSON.stringify({ "Ldno": Ldno }),
  14.         success: function (data) {
  15.             $('#content-box').html(data);
  16.             InitForm();
  17.             InitSortingHeader("content-box");
  18.         },
  19.         error: function (e) {
  20.             //alert(e.responseText);
  21.             WaitMeStop();
  22.            // l.stop();
  23.             alertify.error("Something technical error occurred");
  24.         }
  25.     }).done(function () {
  26.         WaitMeStop();
  27.        // l.stop();
  28.     });
  29.  }
  30.   
 Ajax Call To Load Search Data From Server And Get Title Error 
  1.                 $.ajax({
  2.                     type: 'POST',
  3.                     url: base + "Chemical/SearchOrderDetails",
  4.                     contentType: "application/json; charset=utf-8",
  5.                     //data: JSON.stringify(jdata),
  6.                    //data: JSON.stringify({ "Ldno": Ldno }),
  7.                     success: function (data) {
  8.                         if (data.indexOf("No record was found") >= 0) {

  9.                             IaoCustomizedMessage(data.toString(), "warning", "dark", true, 2500);
  10.                             $("#grid").append("<tr><td colspan='12'>" + data + "</tr></td>");
  11.                         }
  12.                         else {

  13.                             $("#grid").append(data);
  14.                             ProcesDyesRecipePercantageTableDivVisibility("show");
  15.                         }

  16.                     },
  17.                     error: function (error) {

  18.                         if (typeof error.message == "undefined") {
  19.                             var element = $(error.responseText);
  20.                             var message = element.get(1).innerText;
  21.                             IaoCustomizedMessage(message, "error", "dark", true, 8000);
  22.                         }
  23.                         else IaoCustomizedMessage(e.message, "error", "dark", true, 5500);

  24.                     }
  25.                 }).done(function () {
  26.                 IaoCustomizedMessage("Successfully retrieve data from server", "success", true, 1500);
  27. });
Juquery $.Ajax  Jquery Ajax Method with variable as data For Php Page
  1.     $("body").on("change", "#buyer", function() {
  2.     console.log("Allahu Akbor");
  3.     var buyer = $("#buyer").val().trim();
  4.     var order = $("#order").val().trim();
  5.     $.ajax({
  6.         type: 'GET',
  7.         url: 'GetOrderList.php',
  8.         contentType: "application/json; charset=utf-8",
  9.         data:   { buyer : buyer, order : order   } ,
  10.         success: function (data) {
  11.             $('#message').html(data);
  12.              
  13.         },
  14.         error: function (e) { 
  15.         }
  16.     }).done(function () {
  17.      console.log("Alhamdulilla"); 
  18.     });
  19.    });
       Iao Customized Message
  1. IaoCustomizedMessage(data.toString(), "warning", "dark", true, 2500);
  2.     <link href="@Url.Content("~/Bootstrap/iao-alert.css?_" + DateTime.Now.Ticks)" rel="Stylesheet" /> 
  3.    <script src="@Url.Content("~/Bootstrap/iao-alert.jquery.js?v=" + 1.1)"></script>
  4.  function IaoCustomizedMessage(msg, type, mode, autoHide, alertTime) { // By Muhammad Ashikuzzaman in 2018.10.06
  5.             if (typeof type == "undefined" || type === "") {
  6.                 type = "notification";
  7.             } if (typeof autoHide == "undefined" || autoHide === "") {
  8.                 autoHide = true;
  9.             }
  10.             if (typeof alertTime == "undefined" || alertTime === "") {
  11.                 // alertTime = 3000;
  12.             }
  13.             if (typeof mode == "undefined" || mode === "") {
  14.                 mode = "dark";
  15.             }
  16.             $.iaoAlert({ 
  17.                 // default message
  18.                 msg: msg, 
  19.                 // or 'success', 'error', 'warning'
  20.                 type: type, //"notification", 
  21.                 // or light dark
  22.                 mode: mode, 
  23.                 // auto hide true, false
  24.                 ////  autoHide: true,
  25.                 autoHide: autoHide, 
  26.                 // fade animation speed
  27.                 fadeTime: "2800",
  28.                 // timeout in milliseconds
  29.                 alertTime: alertTime, 
  30.                 // shows close button
  31.                 closeButton: true, 
  32.                 // close on click
  33.                 closeOnClick: true, 
  34.                 // custom position
  35.                 position: 'bottom-right', 
  36.                 // fade on hover
  37.                 fadeOnHover: true, 
  38.                 // z-index
  39.                 zIndex: '999', 
  40.                 // additional CSS class(es)
  41.                 alertClass: '' 
  42.             });
  43.         } 
   Data Table Related Code Snippet :

  Reload Datatable after ajax success
  1.   $('body #quality_control_table').dataTable().fnDestroy();
Detect Shift + Enter key Press or Ctrl + Enter Key Press Or Any key Press
  1.   $(document).keydown(function (e) {
  2.             if (e.keyCode == 13 && !e.shiftKey) { // If shiftKey + ENter is hit
  3.                 debugger;
  4.                 console.log("Only Enter Press");
  5.                 e.preventDefault();
  6.             }
  7.             else if (e.keyCode == 13 && e.shiftKey) { // If shiftKey + ENter is hit
  8.                 debugger;
  9.                 console.log("Shift Entered Pressed");
  10.             }

  11.         });
  12.         $("body").on("keydown", ".AfterHeatSetInfo", function (e) {
  13.             if (e.keyCode == 13 && !e.shiftKey) { // If shiftKey + ENter is hit
  14.                 debugger;
  15.                 console.log("Only Enter Press");
  16.                 e.preventDefault();
  17.             }
  18.             else if (e.keyCode == 13 && e.shiftKey) { // If shiftKey + ENter is hit
  19.                 debugger;
  20.                 console.log("Shift Entered Pressed");
  21.             }

  22.         });

Add Choice