This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// Create directory on specific folder | |
string folderPath = "C:\\Excel\\"; | |
if (!Directory.Exists(folderPath)) | |
{ | |
Directory.CreateDirectory(folderPath); | |
} | |
//// Get path of user "Documents" Folder | |
string user = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---- MD5Hash in SQL | |
DECLARE @password varchar(10)='12345789' | |
SELECT CONVERT(VARCHAR(32), HashBytes('MD5', @password), 2) as MD5Hash | |
--- Data Migration from plain text to MD5Hash | |
INSERT INTO [dbo].[E_SS_User_T] | |
([UserName] ,[UserPassword] ,[UserTypeCode] ,[UserEmployeeID] ,[UserEmpName] ,[UserEmpDesignation] ,[UserIsActive] ,[UserNote] ,[UserCreator] ,[UserCreationDate] ) | |
SELECT usr.[name] , CONVERT(VARCHAR(32), HashBytes('MD5', [password]), 2) as MD5Hash,2 ,emp.AutoId,emp.name, desig.name, usr.isActive,'Migrate From DCTL_STORE' , 31725 ,GETDATE() | |
FROM [DCTL_STORE].[dbo].[user_t] usr inner join |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- failed to register url http://localhost 9567(any port no) . Same port is using by another project. | |
Right click on project. select Unload project | |
Again Right click and select Edit ProjectName.csproj & remove these 3 lines --> | |
<DevelopmentServerPort>0</DevelopmentServerPort> | |
<DevelopmentServerVPath>/</DevelopmentServerVPath> | |
<IISUrl>http://localhost:62940/</IISUrl> | |
<!--Save and reload the project and you are good to go --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///Prevent users from submitting a form by hitting Enter or | |
//Avoid Enter Key Form Submit in Pop Up | |
$("#txtSubEmpId").on('keypress', function (event) { | |
if (event.which == 13 && self.GetSubEmpbyIDCode() != "") { | |
event.preventDefault(); | |
// Write ur code here; | |
return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Listbox items unchecked from another event | |
if (lstBoxOrderNo1.CheckedItems.Count > 0) | |
{ | |
int count = lstBoxOrderNo1.CheckedItems.Count; | |
for (int i = 0; i < count; i++) | |
{ | |
lstBoxOrderNo1.SetItemChecked(lstBoxOrderNo1.CheckedIndices[0], false); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT RIGHT('000000' + '8896', 6) AS str_new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.blink { | |
animation: blink-animation 1s steps(5, start) infinite; | |
-webkit-animation: blink-animation 1s steps(5, start) infinite; | |
} | |
@keyframes blink-animation { | |
to { | |
visibility: hidden; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//tab wise excel export from dataset with multiple table | |
if (yarnDS != null && yarnDS.Tables.Count > 0) | |
{ | |
var wb = new XLWorkbook(); | |
var wsCom = wb.Worksheets.Add("Company Job"); | |
wsCom.Cell(1, 1).InsertTable(yarnDS.Tables[0].AsEnumerable()); | |
var wsB = wb.Worksheets.Add("Buyer Company Job"); | |
wsB.Cell(1, 1).InsertTable(yarnDS.Tables[1].AsEnumerable()); | |
var wsR = wb.Worksheets.Add("Rejected Yarns"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".txtNumber").alphanum({ allowLatin: false, maxLength: 7 }); | |
$(".txtDesimal").numeric({ | |
allowMinus: false, | |
allowThouSep: false, | |
maxDigits: 11, | |
maxDecimalPlaces: 2 | |
}); | |
$(".txtPhone").alphanum({ allow: '-+,', allowLatin: false }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF EXISTS(SELECT * FROM [dbo].[PRoll_Company_Monthly_Salary_T_X] WHERE CompSalaryMonth =@month AND [CompSalaryYear] =@Year ) | |
BEGIN | |
---DO something here | |
END |