public override int GetHashCode() { int hashCode = 13; hashCode = (hashCode * 7) + DepartmentID.GetHashCode(); hashCode = (hashCode * 7) + PhoneID.GetHashCode(); return(hashCode); }
public override int GetHashCode() { //Get hash code for the Name field if it is not null. int hashDepartmentID = DepartmentID.GetHashCode(); //Get hash code for the Code field. //Calculate the hash code for the product. return(hashDepartmentID); }
public override string ToString() { return(Utils.WriteXMLString((ref XmlWriter writer) => { writer.WriteStartElement(nameof(Group)); writer.WriteAttributeString(nameof(ID), ID.ToString()); writer.WriteAttributeString(nameof(DepartmentID), DepartmentID.ToString()); writer.WriteAttributeString(nameof(SpecialtyID), SpecialtyID.ToString()); writer.WriteAttributeString(nameof(GroupName), GroupName); writer.WriteEndElement(); })); }
/// <summary> /// Сравнение объектов /// </summary> /// <param name="other"></param> /// <returns></returns> public bool Equals(IOrgItem other) { if (other is Employee) { Employee otherEmployee = other as Employee; return(Id.Equals(otherEmployee.Id) && DepartmentID.Equals(otherEmployee.DepartmentID) && SurName.Equals(otherEmployee.SurName) && FirstName.Equals(otherEmployee.FirstName) && Patronymic.Equals(otherEmployee.Patronymic) && DateOfBirth.Equals(otherEmployee.DateOfBirth) && DocSeries.Equals(otherEmployee.DocSeries) && DocNumber.Equals(otherEmployee.DocNumber) && Position.Equals(otherEmployee.Position)); } return(false); }
public bool Equals(DepartmentAntibioticIntensityDomain other) { if (Object.ReferenceEquals(other, null)) { return(false); } //Check whether the compared object references the same data. if (Object.ReferenceEquals(this, other)) { return(true); } //Check whether the products' properties are equal. return(DepartmentID.Equals(other.DepartmentID)); }
protected void bindDepartmentList() { DataTableConversion lsttodt = new DataTableConversion(); DepartmentInterface service = new DepartmentBussiness(); var lst = service.GetDepartmentList().Select(x => new { x.Name, x.ID }).ToList(); DataTable dt = lsttodt.ToDataTable(lst); if (dt != null && dt.Rows.Count > 0) { DepartmentID.DataSource = dt; DepartmentID.DataTextField = "Name"; DepartmentID.DataValueField = "ID"; DepartmentID.DataBind(); } else { DepartmentID.DataBind(); } }
public ActionResult ClassScheduleInformationView(DepartmentID department) { ViewBag.ClassSchedules = classScheduleManager.GetCourseInformation(department.DepartmentId); ViewBag.Departments = classScheduleManager.GetDepartmentDropdownList(); return(View()); }
public override void Awake() { //base.Awake(); positions = new List <Position>(); departments = new List <Department>(); titles = new List <Title>(); var notchoose = new Dropdown.OptionData("未选中"); List <Dropdown.OptionData> list = new List <Dropdown.OptionData>(); positions.AddRange(Kernel.Current.Sql.LoadEntitys <Position>()); foreach (var item in positions) { list.Add(new Dropdown.OptionData(item.Name)); } PositionID.ClearOptions(); list.Add(notchoose); PositionID.AddOptions(list); //Debug.Log(PositionID.options.Count + " " + PositionID.value); PositionID.value = PositionID.options.Count - 1; list.Clear(); departments.AddRange(Kernel.Current.Sql.LoadEntitys <Department>()); foreach (var item in departments) { list.Add(new Dropdown.OptionData(item.Name)); } DepartmentID.ClearOptions(); list.Add(notchoose); DepartmentID.AddOptions(list); DepartmentID.value = DepartmentID.options.Count - 1; list.Clear(); titles.AddRange(Kernel.Current.Sql.LoadEntitys <Title>()); foreach (var item in titles) { list.Add(new Dropdown.OptionData(item.Name)); } TitleID.ClearOptions(); list.Add(notchoose); TitleID.AddOptions(list); TitleID.value = TitleID.options.Count - 1; query.onClick.AddListener(() => { string sql = null; bool oneWhere = true; if (NationText.input.text.IsNotEmpty()) { sql += $"Nation like \'%{NationText.input.text}%\' "; oneWhere = false; } if (BirthDay.transform.Find("PickButton").GetComponent <Button>().interactable) { string and = null; if (oneWhere == true) { oneWhere = false; } else { and = "and"; } sql += $"{and} BirthDay=\'{(new SqlDateTime(BirthDay.DateTime)).ToSqlString()}\' "; } if (NameText.input.text.IsNotEmpty()) { string and = null; if (oneWhere == true) { oneWhere = false; } else { and = "and"; } sql += $"{and} Name=\'{NameText.input.text}\' "; } if (PoliticalOutlookText.input.text.IsNotEmpty()) { string and = null; if (oneWhere == true) { oneWhere = false; } else { and = "and"; } sql += $"{and} PoliticalOutlook like \'%{PoliticalOutlookText.input.text}%\' "; } if (EducationText.input.text.IsNotEmpty()) { string and = null; if (oneWhere == true) { oneWhere = false; } else { and = "and"; } sql += $"{and} Education=\'{EducationText.input.text}\' "; } if (AddressText.input.text.IsNotEmpty()) { string and = null; if (oneWhere == true) { oneWhere = false; } else { and = "and"; } sql += $"{and} Address like \'%{AddressText.input.text}%\' "; } if (infoText.input.text.IsNotEmpty()) { string and = null; if (oneWhere == true) { oneWhere = false; } else { and = "and"; } sql += $"{and} Info like \'%{infoText.input.text}%\' "; } if (PositionID.value != PositionID.options.Count - 1) { string and = null; if (oneWhere == true) { oneWhere = false; } else { and = "and"; } sql += $"{and} PositionID={positions[PositionID.value].ID} "; } if (TitleID.value != TitleID.options.Count - 1) { string and = null; if (oneWhere == true) { oneWhere = false; } else { and = "and"; } sql += $"{and} TitleID={titles[TitleID.value].ID} "; } if (DepartmentID.value != DepartmentID.options.Count - 1) { string and = null; if (oneWhere == true) { oneWhere = false; } else { and = "and"; } sql += $"{and} DepartmentID={departments[DepartmentID.value].ID} "; } try { Debug.Log(sql); var result = Kernel.Current.Sql.QueryWhere <Personnel>(sql); Kernel.Current.Desktop.OpenNew <SearchResultForm>().AddItems(new List <Personnel>(result)); } catch (Exception e) { Debug.Log(e.Message); Kernel.Current.Desktop.OpenNew <DialogForm>().SetDialog(null, "错误!", "输入的数据全为空或格式有错误!"); } }); datetimeToggle.onValueChanged.AddListener(x => { BirthDay.transform.Find("PickButton").GetComponent <Button>().interactable = x; }); datetimeToggle.isOn = false; goBack.onClick.AddListener(() => Kernel.Current.Desktop.GoBack()); }
public override string ToString() { return($"Department ID: {DepartmentID.ToString()} Name: {Name}, Group Name: {GroupName}, Last Modified: {ModifiedDate.ToString()}"); }
public List <Claim> GetClaims(ClaimsPrincipal principal) { //getting the claims for the token created by the sts List <Claim> claims = new List <Claim>() { new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", Email), new Claim("http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider", Email), new Claim("'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", Email), new Claim(System.IdentityModel.Claims.ClaimTypes.Name, Email), //new Claim(System.IdentityModel.Claims.ClaimTypes.NameIdentifier, Email), new Claim(Const.CLAIM.CLAIM_NAMESPACE + "/" + "Email", Email), new Claim(Const.CLAIM.CLAIM_NAMESPACE + "/" + "PhoneNumber", PhoneNumber), new Claim(Const.CLAIM.CLAIM_NAMESPACE + "/" + Const.Fields.EMPLOYEE_ROLE_ID, ManagerID.ToString()), new Claim(Const.CLAIM.CLAIM_NAMESPACE + "/" + Const.Fields.EMPLOYEE_FIRST_NAME, FirstName), new Claim(Const.CLAIM.CLAIM_NAMESPACE + "/" + Const.Fields.EMPLOYEE_LAST_NAME, LastName), new Claim(Const.CLAIM.CLAIM_NAMESPACE + "/" + Const.Fields.EMPLOYEE_ACCESS, Administrator), new Claim(Const.CLAIM.CLAIM_NAMESPACE + "/" + Const.Fields.EMPLOYEE_FIRST_NAME, FirstName), new Claim(Const.CLAIM.CLAIM_NAMESPACE + "/" + Const.Fields.EMPLOYEE_LAST_NAME, LastName), new Claim(Const.CLAIM.CLAIM_NAMESPACE + "/" + Const.Fields.EMPLOYEE_ACCOUNT, Account), new Claim(Const.CLAIM.CLAIM_NAMESPACE + "/" + Const.Fields.EMPLOYEE_DEPARTMENT_ID, DepartmentID.ToString()), new Claim(Const.CLAIM.CLAIM_NAMESPACE + "/" + Const.Fields.EMPLOYEE_ROLE_ID, RoleID.ToString()), new Claim(Const.CLAIM.CLAIM_NAMESPACE + "/" + Const.Fields.EMPLOYEE_ID, EmployeeID.ToString()), new Claim(Const.CLAIM.CLAIM_NAMESPACE + "/" + Const.Fields.EMPLOYEE_HIRE_DATE, HireDate.ToString()) }; return(claims); }
protected void lvMDDepartment_ItemCommand(object sender, ListViewCommandEventArgs e) { Int64 DepartmentID; Int64.TryParse(e.CommandArgument.ToString(), out DepartmentID); if (DepartmentID > 0) { if (string.Equals(e.CommandName, "EditItem")) { _DepartmentID = DepartmentID; PrepareEditView(); cpeEditor.Collapsed = false; cpeEditor.ClientState = "false"; } else if (string.Equals(e.CommandName, "DeleteItem")) { try { Int64 result = -1; String fe = SqlExpressionBuilder.PrepareFilterExpression(MDDepartmentEntity.FLD_NAME_DepartmentID, DepartmentID.ToString(), SQLMatchType.Equal); MDDepartmentEntity mDDepartmentEntity = new MDDepartmentEntity(); result = FCCMDDepartment.GetFacadeCreate().Delete(mDDepartmentEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No); if (result == 0) { _DepartmentID = 0; _MDDepartmentEntity = new MDDepartmentEntity(); PrepareInitialView(); BindMDDepartmentList(); MiscUtil.ShowMessage(lblMessage, "Department has been successfully deleted.", true); } else { MiscUtil.ShowMessage(lblMessage, "Failed to delete Department.", true); } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } } }