public override DateTimeOffset?NextDate(DateTimeOffset?Date = null) { var date = Date ?? DateTimeOffset.MinValue; var begin = CreateDate.ReplaceTime(Time); return(date <= begin ? begin : throw new NotSupportedException("此API尚未实现")); }
public override int GetHashCode() { int hashCode = IdVer.GetHashCode() + IdSubVer.GetHashCode() + Timestamp.GetHashCode() + (IdPrototype == null ? 0 : IdPrototype.GetHashCode()) + (IdItemBcn == null ? 0 : IdItemBcn.GetHashCode()) + (IdMatTypeL1 == null ? 0 : IdMatTypeL1.GetHashCode()) + (IdMatTypeL2 == null ? 0 : IdMatTypeL2.GetHashCode()) + (IdMatTypeL3 == null ? 0 : IdMatTypeL3.GetHashCode()) + (IdDefaultSupplier == null ? 0 : IdDefaultSupplier.GetHashCode()) + (IdModel == null ? 0 : IdModel.GetHashCode()) + (IdFamilyHK == null ? 0 : IdFamilyHK.GetHashCode()) + (IdColor1 == null ? 0 : IdColor1.GetHashCode()) + (IdColor2 == null ? 0 : IdColor2.GetHashCode()) + (IdItemHK == null ? 0 : IdItemHK.GetHashCode()) + (ItemDescription == null ? 0 : ItemDescription.GetHashCode()) + (Comments == null ? 0 : Comments.GetHashCode()) + (LaunchDate == null ? 0 : LaunchDate.GetHashCode()) + (RemovalDate == null ? 0 : RemovalDate.GetHashCode()) + IdStatusCial.GetHashCode() + IdStatusProd.GetHashCode() + (IdUserAttri1 == null ? 0 : IdUserAttri1.GetHashCode()) + (IdUserAttri2 == null ? 0 : IdUserAttri2.GetHashCode()) + (IdUserAttri3 == null ? 0 : IdUserAttri3.GetHashCode()) + (Unit == null ? 0 : Unit.GetHashCode()) + (DocsLink == null ? 0 : DocsLink.GetHashCode()) + CreateDate.GetHashCode() + (PhotoUrl == null ? 0 : PhotoUrl.GetHashCode()) + (User == null ? 0 : User.GetHashCode()); return(hashCode); }
public override int GetHashCode() { int hashCode = 17; // we *know* we are using this in a dictionary, so pre-compute this hashCode = hashCode * 23 + Id.GetHashCode(); hashCode = hashCode * 23 + (Fid == null ? 0 : Fid.GetHashCode()); hashCode = hashCode * 23 + (EnableDate == null ? 0 : EnableDate.GetHashCode()); hashCode = hashCode * 23 + (DisableDate == null ? 0 : DisableDate.GetHashCode()); hashCode = hashCode * 23 + Dr.GetHashCode(); hashCode = hashCode * 23 + Ts.GetHashCode(); hashCode = hashCode * 23 + (CreateBy == null ? 0 : CreateBy.GetHashCode()); hashCode = hashCode * 23 + (CreateDate == null ? 0 : CreateDate.GetHashCode()); hashCode = hashCode * 23 + (CreateName == null ? 0 : CreateName.GetHashCode()); hashCode = hashCode * 23 + (UpdateBy == null ? 0 : UpdateBy.GetHashCode()); hashCode = hashCode * 23 + (UpdateDate == null ? 0 : UpdateDate.GetHashCode()); hashCode = hashCode * 23 + (UpdateName == null ? 0 : UpdateName.GetHashCode()); hashCode = hashCode * 23 + (TableName == null ? 0 : TableName.GetHashCode()); hashCode = hashCode * 23 + (TableComment == null ? 0 : TableComment.GetHashCode()); hashCode = hashCode * 23 + (TableMode == null ? 0 : TableMode.GetHashCode()); hashCode = hashCode * 23 + (SubTable == null ? 0 : SubTable.GetHashCode()); hashCode = hashCode * 23 + IsTree.GetHashCode(); hashCode = hashCode * 23 + IsPagination.GetHashCode(); hashCode = hashCode * 23 + IsSync.GetHashCode(); return(hashCode); }
public IEnumerable <ValidationResult> Validate(ValidationContext validationContext) { var results = new List <ValidationResult>(); var properCreateDate = CreateDate.AddHours(int.Parse(CreateTime.Split(':')[0])); properCreateDate = properCreateDate.AddMinutes(int.Parse(CreateTime.Split(':')[1])); var properEndDate = DeadlineDate.AddHours(int.Parse(EndTime.Split(':')[0])); properEndDate = properEndDate.AddMinutes(int.Parse(EndTime.Split(':')[1])); var timespan = (properEndDate - properCreateDate).TotalDays; if (timespan < 0) { results.Add(new ValidationResult("Data planowanego zakończenia zadania musi być większa od daty utworzenia", new List <string>() { "EndDate" })); } if (string.IsNullOrEmpty(SelectedUserId) && SelectedGroupId == null) { results.Add(new ValidationResult("Musisz przydzielić zadanie do grupy albo do użytkownika", new List <string>() { "SelectedUserId", "SelectedGroupId" })); } return(results); }
/// <summary> /// Returns true if Role instances are equal /// </summary> /// <param name="other">Instance of Role to be compared</param> /// <returns>Boolean</returns> public bool Equals(Role other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( RoleName == other.RoleName || RoleName != null && RoleName.Equals(other.RoleName) ) && ( CreateDate == other.CreateDate || CreateDate != null && CreateDate.Equals(other.CreateDate) ) && ( Identities == other.Identities || Identities != null && Identities.Equals(other.Identities) )); }
public override string ToString() { string noHtml = Regex.Replace(QuestionBody, @"<[^>]*>", String.Empty); String minBody = noHtml.Substring(0, Math.Min(noHtml.Length, 50)); return($"{Course.CourseName} Kursunda {CreateDate.ToString("dd.MM.yyyy hh:mm")} tarihinde => {QuestionName} <= sorusu gelmiştir. Detayının ilk 50 karakteri: {minBody}..."); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (RoleName != null) { hashCode = hashCode * 59 + RoleName.GetHashCode(); } if (CreateDate != null) { hashCode = hashCode * 59 + CreateDate.GetHashCode(); } if (Identities != null) { hashCode = hashCode * 59 + Identities.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { const int NUM1 = 5404; const int NUM2 = 823; int hash = NUM1; if (Name != null) { hash = (NUM2 * hash) + Name.GetHashCode(); } hash = (NUM2 * hash) + CreateDate.GetHashCode(); if (ActiveCredential != null) { hash = (NUM2 * hash) + ActiveCredential.GetHashCode(); } if (CredentialHistory != null) { foreach (Credential cred in CredentialHistory) { hash = (NUM2 * hash) + cred.GetHashCode(); } } if (Notes != null) { hash = (NUM2 * hash) + Notes.GetHashCode(); } return(hash); }
public override string ToString() { string Answer = "Hosting Unit Key: " + HostingUnitKey + ", \nGuest Request Key: " + GuestRequestKey + ", \nOrder Key: " + OrderKey + ", \nStatus: " + Status + ", \nCreate Date: " + CreateDate.ToString("dd/MM/yyyy") + ", \nOrder Date: " + OrderDate.ToString("dd/MM/yyyy") + " \n"; return(Answer); }
public override int GetHashCode() { var hashCode = -1294847358; hashCode = hashCode * -1521134295 + Id.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <Account> .Default.GetHashCode(Account); hashCode = hashCode * -1521134295 + CreateDate.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <DateTime?> .Default.GetHashCode(LastModification); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Title); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Description); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Content); hashCode = hashCode * -1521134295 + EqualityComparer <List <Paragraph> > .Default.GetHashCode(Paragraphs); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ImageUrl); hashCode = hashCode * -1521134295 + IsVisible.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <ContentCategory> .Default.GetHashCode(ContentCategory); hashCode = hashCode * -1521134295 + EqualityComparer <Account> .Default.GetHashCode(LastModifiedBy); return(hashCode); }
// /// <summary> /// Create a 'to string'. /// </summary> public override string ToString() { // StringBuilder _return = new StringBuilder("record:["); _return.AppendFormat("Id: {0}, ", Id); _return.AppendFormat("UserName: {0}, ", UserName); _return.AppendFormat("Email: {0}, ", Email); _return.AppendFormat("FirstName: {0}, ", FirstName); _return.AppendFormat("LastName: {0}, ", LastName); _return.AppendFormat("FullName: {0}, ", FullName); _return.AppendFormat("UserNicName: {0}, ", UserNicName); _return.AppendFormat("CompanyId: {0}, ", CompanyId.ToString()); _return.AppendFormat("CreateDate: {0}, ", CreateDate.ToString()); _return.AppendFormat("EmailConfirmed: {0}, ", EmailConfirmed.ToString()); _return.AppendFormat("PhoneNumber: {0}, ", PhoneNumber); _return.AppendFormat("PhoneNumberConfirmed: {0}, ", PhoneNumberConfirmed.ToString()); _return.AppendFormat("TwoFactorEnabled: {0}, ", TwoFactorEnabled.ToString()); if (LockoutEndDateUtc.HasValue) { _return.AppendFormat("LockoutEndDateUtc: {0}, ", LockoutEndDateUtc.ToString()); } else { _return.AppendFormat("/LockoutEndDateUtc/, "); } _return.AppendFormat("LockoutEnabled: {0}, ", LockoutEnabled.ToString()); _return.AppendFormat("AccessFailedCount: {0}]", AccessFailedCount.ToString()); return(_return.ToString()); }
private void button5_Click(object sender, EventArgs e) { moveSidePanel(btnCreateDate); CreateDate ssa = new CreateDate(); addControlsTopanel(ssa); }
/// <summary> /// 是否到了免费期 如果是出售的主题 超出了出售期限 就自动变为免费 /// </summary> /// <param name="forumSetting"></param> /// <returns></returns> public bool IsOverSellDays(ForumSettingItem forumSetting) { if (forumSetting.SellThreadDays == 0) { return(false); } return(CreateDate.AddSeconds(forumSetting.SellThreadDays) <= DateTimeUtil.Now); }
public override bool LogAction(ILogger LogClass) { log = LogClass; var LogMsg = $"[{CreateDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}][{Type}] Message: {Msg}"; log.Log(LogMsg, FileName, CreateDate); return(true); }
public override void AfterConstruction() { base.AfterConstruction(); CreateDate = DateTime.Now; SendDate = CreateDate.AddDays(3); Deadline = CreateDate.AddDays(7); }
public override string ToString() { return("Hosting Unit Key: " + HostingUnitKey + "\n" + "Guest Request Key: " + GuestRequestKey + "\n" + "Order Key: " + OrderKey + "\n" + "Create Date: " + CreateDate.ToString("dd/MM") + "\n" + "Order Date: " + OrderDate.ToString("dd/MM")); }
internal async Task SetInvoice(int data) { if (data > 0) { var invoice = await MainVM.InvoiceCollections.GetItemById(data); if (invoice != null) { this.CreateDate = invoice.CreateDate; this.Customer = invoice.Customer; this.CustomerId = invoice.CustomerId; this.CustomerSelectedItem = invoice.Customer; this.DeadLine = invoice.DeadLine; this.DeliveryDate = invoice.DeliveryDate; this.Id = invoice.Id; this.InvoicePayType = invoice.InvoicePayType; this.InvoiceStatus = invoice.InvoiceStatus; this.IsDelivery = invoice.IsDelivery; this.Number = invoice.Number; this.PaidDate = invoice.PaidDate; this.ReciveDate = invoice.ReciveDate; this.ReciverBy = invoice.ReciverBy; this.Tax = invoice.Tax; await Task.Delay(3000); foreach (var item in invoice.Invoicedetail) { item.IsSelected = true; this.Invoicedetail.Add(item); } this.SourceView.Refresh(); } } else { this.Invoicedetail.Clear(); this.CreateDate = DateTime.Now; this.Customer = null; this.CustomerId = 0; this.CustomerSelectedItem = null; this.DeadLine = CreateDate.AddMonths(1); this.DeliveryDate = null; this.Id = 0; this.InvoicePayType = InvoicePayType.None; this.InvoiceStatus = InvoiceStatus.None; this.IsDelivery = false; this.Number = 0; this.PaidDate = null; this.ReciveDate = null; this.ReciverBy = string.Empty; this.Tax = 0; await Task.Delay(3000); this.SourceView.Refresh(); } }
public override string ToString() { return("Hosting unit key: " + HostingUnitKey.ToString() + "/n" + "Guest request key: " + GuestRequestKey.ToString() + "/n" + "Order key: " + OrderKey.ToString() + "/n" + "Status: " + Status.ToString() + "/n" + "Orderd date: " + OrderDate.ToString() + "/n" + "Create date" + CreateDate.ToString() + "/n"); }
public override void AfterConstruction() { base.AfterConstruction(); PurchaseDate = DateTime.Now; CreateDate = DateTime.Now; IsPosted = false; CreatedBy = Session.GetObjectByKey <Employee>(Session.GetKeyValue(SecuritySystem.CurrentUser)); PurchaseCode = string.Format("P{0}", CreateDate.ToString("yyMMddHHmmssfff")); }
public override string ToString() { return("Request Key : " + Key + "\nClient ID : " + ClientId + "\nCreate date : " + CreateDate.ToString(format: "dd/MM/yyyy") + "\nEntry date : " + EntryDate.ToString(format: "dd/MM/yyyy") + "\nLeave date : " + LeaveDate.ToString(format: "dd/MM/yyyy") + "\n"); }
/// <summary> /// 新增调用 /// </summary> public override void Create() { this.Id = string.IsNullOrEmpty(Id) ? Guid.NewGuid().ToString() : Id; this.CreateDate = string.IsNullOrEmpty(CreateDate.ToString()) ? DateTime.Now : CreateDate; this.CreateUserId = OperatorProvider.Provider.Current().UserId; this.CreateUserName = OperatorProvider.Provider.Current().UserName; this.CreateUserDeptCode = OperatorProvider.Provider.Current().DeptCode; this.CreateUserOrgCode = OperatorProvider.Provider.Current().OrganizeCode; }
/// <summary> /// 引数データが同一かチェック /// </summary> /// <param name="obj">引数データ</param> public override bool Equals(object obj) { if (obj is Job job) { return(CreateDate.Equals(job.CreateDate)); } else { return(false); } }
public override string ToString() { return ("Hosting Unit Key: " + HostingUnitKey.ToString() + "\n" + "Guest Request Key: " + GuestRequestKey.ToString() + "\n" + "Order Key: " + OrderKey.ToString() + "\n" + "Fee: " + Fee.ToString() + "\n" + "Status: " + Status.ToString() + "\n" + "Create Date: " + CreateDate.ToString() + "\n"); //+ "Order Date: " + OrderDate.ToString() + "\n"; }
public void CreateDateCommand(object param) { CreateDate cd = new CreateDate(m_wd, m_listView.SelectedItems.Cast <Character>().ToArray()); cd.ShowDialog(); if (cd.IsAdded) { m_wd.SelectedTree.AddDate(cd, m_listView.SelectedItems.Cast <Character>().ToArray()); } }
public override int GetHashCode() { int hash = 17; hash = hash * 31 + (Id == null ? 0 : Id.GetHashCode()); hash = hash * 31 + (Author == null ? 0 : Author.GetHashCode()); hash = hash * 31 + (Kind == null ? 0 : Kind.GetHashCode()); hash = hash * 31 + (CreateDate == null ? 0 : CreateDate.GetHashCode()); hash = hash * 31 + IsDeleted.GetHashCode(); return(hash); }
public override int GetHashCode() { if (fHashCode == 0) { fHashCode = base.GetHashCode(); fHashCode = fHashCode * 37 + CreateDate.GetHashCode(); fHashCode = fHashCode * 19 + AssociatedEntitiesCount; } return(fHashCode); }
public override string ToString() // יש לממש בהתאם לדרישות הפרוייקט. { string str = ""; str += "מספר הזמנה: " + OrderKey + "\n" + "עבור יחידת אירוח מספר " + HostingUnitKey + "\n" + "מספר דרישת אירוח " + GuestRequestKey + "\n" + //"Status: " + Status + "\n" + "תאריך יצירת הזמנה " + CreateDate.ToString() + "\n" ; return(str); }
public override string ToString() { return("Reservation confirmation #" + ReservationId.ToString() + " is for " + Name.PadRight(7) + " \n at " + ParkName + " park and at " + CampgroundName + " campground (#" + CampgroundId + ") at site #" + SiteId.ToString().PadRight(3) + "\n from " + FromDate.ToString("D") + " to " + ToDate.ToString("D") + " and was created on " + CreateDate.ToString("D") + "\n Total Cost is of stay: " + String.Format("{0:C2}", ((ToDate - FromDate).Days * DailyFee))); }
public override bool Equals(Object obj) { if (obj is Problem ob) { return(Id.Equals(ob.Id) && CategoryId.Equals(ob.CategoryId) && ThemeId.Equals(ob.ThemeId) && Adress.Equals(ob.Adress) && SourceId.Equals(ob.SourceId) && CreateDate.Equals(ob.CreateDate) && AnswerDate.Equals(ob.AnswerDate) && ProblemText.Equals(ob.ProblemText) && ProblemPhotos.Equals(ob.ProblemPhotos) && AnswerText.Equals(ob.AnswerText) && AnswerPhotos.Equals(ob.AnswerPhotos) && StatusId.Equals(ob.StatusId) && DistrictId.Equals(ob.DistrictId) && ChildID.Equals(ob.ChildID) && ParentID.Equals(ob.ParentID) && IspolnitelName.Equals(ob.IspolnitelName) && IspolnitelId.Equals(ob.IspolnitelId)); } return(false); }
public override string ToString() // יש לממש בהתאם לדרישות הפרוייקט. { string str = ""; str += "Orderkey: " + OrderKey + "\n" + "HostUnitKEy " + HostingUnitKey + "\n" + "GuestRequestkey " + GuestRequestKey + "\n" + "Status: " + Status + "\n" + "Create Date " + CreateDate.ToString() + "\n" + "Order date: " + OrderDate.ToString() + "\n" ; return(str); }