public void RecordType() { RecordType r1 = new RecordType() .Add(new NamedFormulaType("Num", FormulaType.Number)) .Add(new NamedFormulaType("B", FormulaType.Boolean)); RecordType r2 = new RecordType() .Add(new NamedFormulaType("B", FormulaType.Boolean)) .Add(new NamedFormulaType("Num", FormulaType.Number)); // Structural equivalence Assert.Equal(r1, r2); // Test op== Assert.True(r1 == r2); Assert.False(null == r2); Assert.False(r1 == null); Assert.True(r1 != null); Assert.True(null != r1); Assert.False(r1 != r2); Assert.True(r1.Equals(r2)); Assert.False(r1.Equals(null)); Assert.Equal(r1.GetHashCode(), r2.GetHashCode()); }
public HseqRecord PopulateRecordTypeDefaults(RecordType recordType, HseqRecord hseqRecord) { hseqRecord.EnteredBy = HttpContext.Current.User.Identity.Name; hseqRecord.ReportedBy = currentUser.FirstName + " " + currentUser.LastName + " , " + currentUser.Department; //Retrieve the Quality Coordinator from the custom file //ViewBag.QualityCoordinator = ConfigurationManager.AppSettings.Get("QualityCoordinator"); if (recordType.Equals(RecordType.NCR)) { hseqRecord.RecordType = RecordType.NCR; } else if (recordType.Equals(RecordType.FIS)) { hseqRecord.RecordType = RecordType.FIS; } else if (recordType.Equals(RecordType.CAR)) { hseqRecord.RecordType = RecordType.CAR; } else if (recordType.Equals(RecordType.PAR)) { hseqRecord.RecordType = RecordType.PAR; } return(hseqRecord); }
public bool Equals(DnsMessageEntryBase other) { if (other == null) { return(false); } return(Name.Equals(other.Name) && RecordType.Equals(other.RecordType) && RecordClass.Equals(other.RecordClass)); }
public static bool IsExpected(RegionData.RegionDataType dataType, RecordType recordType) { switch (dataType) { case RegionData.RegionDataType.Object: if (!recordType.Equals(RDOT)) { return(false); } break; case RegionData.RegionDataType.Weather: if (!recordType.Equals(RDWT)) { return(false); } break; case RegionData.RegionDataType.Map: if (!recordType.Equals(RDMP)) { return(false); } break; case RegionData.RegionDataType.Icon: if (!recordType.Equals(ICON)) { return(false); } break; case RegionData.RegionDataType.Grass: if (!recordType.Equals(RDGS)) { return(false); } break; case RegionData.RegionDataType.Sound: if (!recordType.Equals(RDSD) && !recordType.Equals(RDMD)) { return(false); } break; default: return(false); } return(true); }
public ListRecordsPage(int ID, RecordType UserRecordType) { InitializeComponent(); this.ID = ID; this.UserRecordType = UserRecordType; this.Title = (RecordType.Drug != UserRecordType) ? Enum.GetName(typeof(RecordType), UserRecordType) + " Records" : "Drug Prescriptions"; if (!UserRecordType.Equals(RecordType.Personal)) { _AddRecordButton.IsVisible = false; } //_ParentStack.Children.Add(RecordTemplate.RecordTemplate01(0,"Title",ass,false)); //_ParentStack.Children.Add(RecordTemplate.RecordTemplate01(0, "Title 2", "Content", false)); }
public override bool Equals(object obj) { Record temp = obj as Record; if (temp == null) { return(false); } return(RecordID.Equals(temp.RecordID) && Amount == temp.Amount && Date == temp.Date && RecordType.Equals(temp.RecordType) && Category.Equals(temp.Category) && //Description.Equals(temp.Description) && // TODO bug fix here, description is null if not set to something IsDeleted == temp.IsDeleted && LastModified == temp.LastModified); }
public ListRecordsPage(int ID, int MPID, bool IsMedic, RecordType UserRecordType) { InitializeComponent(); this.ID = ID; this.MPID = MPID; this.UserRecordType = UserRecordType; this.Title = (RecordType.Drug != UserRecordType) ? Enum.GetName(typeof(RecordType), UserRecordType) + " Records" : "Drug Prescriptions"; /** * if the user is not a medic and record type is not personal, disable the add record button * as the user can only add record to the personal records page * **/ if (!IsMedic && !UserRecordType.Equals(RecordType.Personal)) { _AddRecordButton.IsVisible = false; } //_ParentStack.Children.Add(RecordTemplate.RecordTemplate01(0, "Title", ass, false)); //_ParentStack.Children.Add(RecordTemplate.RecordTemplate01(0, "Title 2", "Content", false)); }