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
https://www.sqlshack.com/table-valued-parameters-in-sql-server/ |
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
// HTML code | |
<div id="DataFromSession" runat="server"></div> | |
///set data from C# to HTML | |
var Id = Session["EmpId"]; | |
var UserType = Session["SUserType"]; | |
DataFromSession.InnerHtml = "<script type='text/javascript'>var IdJson=" + Id + ";var UserTypeJson=" + UserType + ";</script>"; | |
/// Access above data (UserTypeJson,IdJson) from js | |
if (parseInt(UserTypeJson) > 1 && IdJson != self.EmpId()) { |
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 reg.employee_id, reg.date AttendDate,reg.inTime_date AttendInTime, | |
outTime_date AS AttendOutTime, RANK() over (order by reg.date desc) as _Rank | |
INTO #otDate_T | |
FROM employee_attendance_register_t reg WITH (NOLOCK) | |
INNER JOIN #EmpIds_T ON reg.employee_id =#EmpIds_T.EmployeeID | |
INNER JOIN #AbsentDate_T ON reg.employee_id =#AbsentDate_T.employee_id AND #AbsentDate_T.OT > 0 | |
WHERE MONTH(reg.date) = MONTH(@GeneralDutyDate) AND YEAR(reg.date) = YEAR(@GeneralDutyDate) |
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
---in controller code | |
Int64 creator = Convert.ToInt64(HttpContext.User.Identity.Name.Split('#')[0]); | |
var xmlChild = new XElement("ArrayOfSecuritySubject", view.SectorwiseSurveyList.Select(x => new XElement("ESecuritySubject", | |
new XElement("ChildID", x.ChildID), | |
new XElement("inspectionSubjectId", x.SubjectID), | |
new XElement("obtainedMarks", x.Marks), | |
new XElement("isNotApplicable", x.notApplicable), | |
new XElement("remarks", x.InspectionRemarks) | |
))); |
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
check HTML5 Validator : https://h5validator.appspot.com/dcm/asset | |
check HTML validator: https://validator.w3.org/ |
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
1.Build WPF Project (example: DirdWPF) | |
2. Go : ProjectWPF>>bin>> Debug >> Dird.pdb+ DirdWPF+ DIRDWPF.pdb (Copy) | |
3. Paste in location : Store>> bin >>debug |
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
var distinctPOValues = excelDataTable.AsEnumerable().Select(row => new | |
{ | |
DistinctPO = row.Field<string>("PO Code"), | |
DistinctOrderNo = row.Field<string>("Order NO") | |
}).Distinct().ToList(); | |
// Distinct with where condition | |
for (int i = 0; i < distinctPOValues.Count; i++) | |
{ | |
var DistinctOrder = excelDataTable.AsEnumerable().Where(r => r.Field<string>("Buyer PO") == distinctPOValues[i].DistinctPO.ToString() |
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
--- This SP is written for weekly backup on Friday. So A scheduler should be created for this SP which will run in every friday & will take full backup. | |
Alter PROCEDURE HRMS_TBD_FullDB_Backup_SP | |
---- WITH ENCRYPTION | |
AS | |
BEGIN | |
DECLARE @MyFileName varchar(1000), @date varchar(100), @location varchar(200), @database varchar(100) | |
set @location = 'E:\DMS\' --set location |
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 you dont take any backup before ENCRYPTION, then you need to use third-party tools for decrypting it. | |
For SQL Decryptor tool : Download dbForge SQL Decryptor (sqldecryptor.exe) | |
> Install dbForge SQL Decryptor (with default settings) | |
> Login to the server through server name, user name & password | |
> Go to the required SP. right on SP & select "Show DDL Script" | |
Wait for few second.... SP body will be shown in a window | |
*** If you need to decrypt a number of stored-procedures or any other encrypted objects, I recommend using the Decryption Wizard. To do this, |
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
shipdateFrom = dtpShipFromdate.Value.ToString("yyyy/MM/dd"); | |
shipdateTo = dtpShipTodate.Value.ToString("dd/MM/yyyy"); |