d.results.length > 0 ? this.existingAddresses = true : this.existingAddresses = false
Don't Do Code
Wednesday, May 25, 2022
Thursday, May 19, 2022
Variable abuse
let checkForHighlight = true;
for (let rows of this.tableBody.nativeElement.children)
{
if (checkForHighlight && rows.classList.contains('alert-warning'))
{
if (checkForHighlight && rows.classList.contains('alert-warning'))
{
checkForHighlight = false;
}
}
checkForHighlight = false;
}
}
if (!checkForHighlight)
{
this.showQuantityWarning = true;
}
this.showQuantityWarning = true;
}
else
{
this.showQuantityWarning = false;
}
this.showQuantityWarning = false;
}
Friday, September 4, 2020
Friday, March 1, 2019
Friday, January 18, 2019
Why! Why! Why!
public override bool Validate()
{
bool bValidate = false;
try
{
bValidate = (EOID > 0 ? true : false);
}
catch (Exception ex)
{
Utilities.LogError(ex.Message, "AbsentHoursBL");
throw;
}
return bValidate;
}
{
bool bValidate = false;
try
{
bValidate = (EOID > 0 ? true : false);
}
catch (Exception ex)
{
Utilities.LogError(ex.Message, "AbsentHoursBL");
throw;
}
return bValidate;
}
Tuesday, June 12, 2018
WOW.... That's efficient
CREATE PROCEDURE dbo.proFormDropDown
(@FormType As VARCHAR(5))
AS
SET NOCOUNT ON
CREATE TABLE #tbl_hold_menu (
menu_num VARCHAR(2),
menu_name VARCHAR(20),
form_type CHAR(1))
INSERT INTO #tbl_hold_menu(menu_num, menu_name, form_type)
SELECT dept_id, dept_desc,dept_menu_type
FROM tbl_dept
ORDER BY dept_desc
INSERT INTO #tbl_hold_menu(menu_num, menu_name, form_type)
SELECT job_id, job_title, job_menu_type FROM tbl_job
WHERE job_menu_type <>'0'
ORDER BY job_menu_type
INSERT INTO #tbl_hold_menu(menu_num, menu_name, form_type)
SELECT shift_num, shift_name, menu_type
FROM tbl_shift
ORDER BY shift_num
INSERT INTO #tbl_hold_menu(menu_num, menu_name, form_type)
SELECT work_team_id, work_team_name, 'T'
FROM tbl_work_team
ORDER BY work_team_name
SELECT * FROM #tbl_hold_menu
WHERE form_type = @FormType
ORDER BY form_type
DROP TABLE #tbl_hold_menu
(@FormType As VARCHAR(5))
AS
SET NOCOUNT ON
CREATE TABLE #tbl_hold_menu (
menu_num VARCHAR(2),
menu_name VARCHAR(20),
form_type CHAR(1))
INSERT INTO #tbl_hold_menu(menu_num, menu_name, form_type)
SELECT dept_id, dept_desc,dept_menu_type
FROM tbl_dept
ORDER BY dept_desc
INSERT INTO #tbl_hold_menu(menu_num, menu_name, form_type)
SELECT job_id, job_title, job_menu_type FROM tbl_job
WHERE job_menu_type <>'0'
ORDER BY job_menu_type
INSERT INTO #tbl_hold_menu(menu_num, menu_name, form_type)
SELECT shift_num, shift_name, menu_type
FROM tbl_shift
ORDER BY shift_num
INSERT INTO #tbl_hold_menu(menu_num, menu_name, form_type)
SELECT work_team_id, work_team_name, 'T'
FROM tbl_work_team
ORDER BY work_team_name
SELECT * FROM #tbl_hold_menu
WHERE form_type = @FormType
ORDER BY form_type
DROP TABLE #tbl_hold_menu
Hard-coded Hell!
Sub WritePosition()
If fPositionID = "0" Then
Response.Write "<OPTION VALUE='0' SELECTED>Select Type </OPTION>"
Response.Write "<OPTION VALUE='F/T'>Full Time</OPTION>"
Response.Write "<OPTION VALUE='P/T'>Part Time</OPTION>"
Response.Write "<OPTION VALUE='Temp'>Agency Hires</OPTION>"
ElseIf fPositionID = "F/T" Then
Response.Write "<OPTION VALUE='0'>Select Type </OPTION>"
Response.Write "<OPTION VALUE='F/T' SELECTED>Full Time</OPTION>"
Response.Write "<OPTION VALUE='P/T'>Part Time</OPTION>"
Response.Write "<OPTION VALUE='Temp'>Agency Hires</OPTION>"
ElseIf fPositionID = "P/T" Then
Response.Write "<OPTION VALUE='0'>Select Type </OPTION>"
Response.Write "<OPTION VALUE='F/T'>Full Time</OPTION>"
Response.Write "<OPTION VALUE='P/T'SELECTED>Part Time</OPTION>"
Response.Write "<OPTION VALUE='Temp'>Agency Hires</OPTION>"
Else
Response.Write "<OPTION VALUE='0'>Select Type </OPTION>"
Response.Write "<OPTION VALUE='F/T'>Full Time</OPTION>"
Response.Write "<OPTION VALUE='P/T'>Part Time</OPTION>"
Response.Write "<OPTION VALUE='Temp' SELECTED>Agency Hires</OPTION>"
End If
End Sub
Subscribe to:
Posts (Atom)