void InitPositionSvc() { Version version = Environment.OSVersion.Version; if (version.Major == 6 && (version.Minor == 0 || version.Minor == 1)) { positionSvc = new PositionSvcWin7(this.Handle, mainwindow); } else if (version.Major == 6 && version.Minor == 3) { positionSvc = new PositionSvcWin10(this.Handle, mainwindow); } else { positionSvc = new PositionBase(this.Handle, mainwindow); } }
public static void AssembleDetails(Page myPage, PositionBase parameter) { try { string sp = "dbo.tcdsb_LTO_PositionDetails_PublishbyID @SchoolYear,@PositionID"; List <PositionPosting> position = GeneralDataAccess.GetListofTypeT <PositionPosting>(sp, parameter); //IPositionRepository<PositionPosting, string> repository = Factory.Get<PositionPosting>(); // IList<Employee2> gridData = repository.GetListItems(WorkingProfile.UserRole, userID, schoolyear, schoolcode, searchby, searchvalue); //Label newLable = (Label)myPage.FindControl("LabelSchoolName"); //newLable.Text = position[0].SchoolName; //newLable = (Label)myPage.FindControl("LabelTeacherName"); //newLable.Text = position[0].TeacherName; //newLable = (Label)myPage.FindControl("LabelCPNum"); //newLable.Text = position[0].CPNum; //newLable = (Label)myPage.FindControl("LabelHireDate"); //newLable.Text = position[0].DateOfHire; //newLable = (Label)myPage.FindControl("LabelCurrentStatus"); //newLable.Text = position[0].OTType; //TextBox newtextbox = (TextBox)myPage.FindControl("LabelOCTQualification"); //newtextbox.Text = position[0].Qualification; //foreach (Staff myitem in profile) //{ // Label newLable = (Label)myPage.FindControl("LabelSchoolName"); // newLable.Text = myitem.SchoolName; // HtmlTextArea newArea = (HtmlTextArea)myPage.FindControl("Text" + code); // newArea.Value = myitem.Notes; //} } catch (Exception ex) { var exm = ex.Message; throw new Exception(); } }