Skip to content

Instantly share code, notes, and snippets.

View ritacse's full-sized avatar

Wahida Yasmin ritacse

  • Bangladesh
View GitHub Profile
@ritacse
ritacse / WPF
Created October 28, 2020 07:13
1.Build WPF Project (example: DirdWPF)
2. Go : ProjectWPF>>bin>> Debug >> Dird.pdb+ DirdWPF+ DIRDWPF.pdb (Copy)
3. Paste in location : Store>> bin >>debug
check HTML5 Validator : https://h5validator.appspot.com/dcm/asset
check HTML validator: https://validator.w3.org/
---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)
)));
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)
// 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()) {
https://www.sqlshack.com/table-valued-parameters-in-sql-server/
///in .cs page add version using any number:
public partial class frmKPIWiseAchievementFinal : System.Web.UI.Page
{
public string version = DateTime.Now.ToString(); ///<- Just add this line
protected void Page_Load(object sender, EventArgs e)
{
}
}
///in controller add version using any number:
public ActionResult Survey()
{
ViewBag.version = DateTime.Now.ToString("yymmddHH");
return View();
}
//// in html page add version with js file name:
<script src="~/Assets/lib/CommonUI/js/BIDA/[email protected]"></script>
CREATE TABLE SECTION(
c# int FOREIGN KEY REFERENCES Course(c#),
se# int,
emp# int FOREIGN KEY REFERENCES Professor(EMP#),
class_time time,
controlNumber int DEFAULT 20,
CONSTRAINT pk_SectionID PRIMARY KEY (c#, se#),
-----Adding Conditional constraint here ---
CONSTRAINT chk_controlNumber CHECK (
// Read Web.Config Key from server end in C#
// add Key in Web.Config after ending: </connectionStrings> tag
<appSettings>
<add key="FileUploadedPath" value="~/PurchaseCSDocument/" />
<add key="LiscenseExpireDate" value="2023-01-15" />
</appSettings>
// Declare global Variable in server end(controller or handler) & get value
private string LiscenseExpireDate = Convert.ToString(ConfigurationManager.AppSettings["LiscenseExpireDate"]);