public override int GetHashCode() { int hashCode = -1413410039; if (BeginTime != null) { hashCode += BeginTime.GetHashCode(); } if (EndTime != null) { hashCode += EndTime.GetHashCode(); } if (SortOrder != null) { hashCode += SortOrder.GetHashCode(); } if (Cursor != null) { hashCode += Cursor.GetHashCode(); } return(hashCode); }
public void FromCustomObject(SqlConnection con, IntPtr pUdt) { if (ID != null) { SqlUdt.SetValue(con, pUdt, "ID", ID.ToSqlValue()); } if (CheckNo != null) { SqlUdt.SetValue(con, pUdt, "CheckNo", CheckNo.ToSqlValue()); } if (CheckType != null) { SqlUdt.SetValue(con, pUdt, "CheckType", CheckType.ToSqlValue()); } if (DutyUser != null) { SqlUdt.SetValue(con, pUdt, "DutyUser", DutyUser.ToSqlValue()); } if (CheckDesc != null) { SqlUdt.SetValue(con, pUdt, "CheckDesc", CheckDesc.ToSqlValue()); } if (CheckStatus != null) { SqlUdt.SetValue(con, pUdt, "CheckStatus", CheckStatus.ToSqlValue()); } if (BeginTime != null) { SqlUdt.SetValue(con, pUdt, "BeginTime", BeginTime.ToSqlValue()); } if (DoneTime != null) { SqlUdt.SetValue(con, pUdt, "DoneTime", DoneTime.ToSqlValue()); } if (Remarks != null) { SqlUdt.SetValue(con, pUdt, "Remarks", Remarks.ToSqlValue()); } if (IsDel != null) { SqlUdt.SetValue(con, pUdt, "IsDel", IsDel.ToSqlValue()); } if (Creater != null) { SqlUdt.SetValue(con, pUdt, "Creater", Creater.ToSqlValue()); } if (CreateTime != null) { SqlUdt.SetValue(con, pUdt, "CreateTime", CreateTime.ToSqlValue()); } if (Modifyer != null) { SqlUdt.SetValue(con, pUdt, "Modifyer", Modifyer.ToSqlValue()); } if (ModifyTime != null) { SqlUdt.SetValue(con, pUdt, "ModifyTime", ModifyTime.ToSqlValue()); } }
public int CompareTo(TimePeriodPacket other) { if (other == null) { return(1); } return(BeginTime.CompareTo(other.BeginTime)); }
/// <summary> /// 将日期、各种编码,编码进frame /// </summary> /// <param name="frame"></param> /// <param name="isSequence"></param> internal override void Encode(Frame frame, bool isSequence = false) { //不编码地址,直接编码内容 frame.SetNextByte(BeginAddress); frame.SetNextByte(EndAddress); frame.AppendBytes(BeginTime.GetEncodedValue()); frame.AppendBytes(EndTime.GetEncodedValue()); }
//неявное преобразование информации о событии в строку public override string ToString() { string eventInfo = ""; eventInfo += "| " + Description.PadRight(60, ' ') + " | " + BeginTime.ToString("g").PadRight(16, ' ') + " | " + EndTime.ToString("g").PadRight(16, ' ') + " |"; return(eventInfo); }
/// <summary> /// 设置业务 /// </summary> protected override void SetBusiness() { if (HasSaveProperty(it => it.BeginTime)) { BeginTime = BeginTime.ToString("1900-01-01 HH:mm:ss").Convert <DateTime>(); } if (HasSaveProperty(it => it.EndTime)) { EndTime = EndTime.ToString("1900-01-01 HH:mm:ss").Convert <DateTime>(); } }
private void ChangeEndTime() { if (EndTime < BeginTime) { var newEndTime = BeginTime.Add(new TimeSpan(0, 45, 0)); var maxTime = new TimeSpan(23, 59, 0); if (newEndTime > maxTime) { newEndTime = maxTime; } EndTime = newEndTime; } }
private void ChangedEmployee() { if (EntityEmployee != null) { teEmployee.Text = EntityEmployee.FullName; BeginTime = DateTime.Today; EndTime = BeginTime.AddDays(14); } LoadStores(); InitMinMax(); }
public override int GetHashCode() { int hashCode = 805936600; if (BeginTime != null) { hashCode += BeginTime.GetHashCode(); } if (EndTime != null) { hashCode += EndTime.GetHashCode(); } if (SortOrder != null) { hashCode += SortOrder.GetHashCode(); } if (Cursor != null) { hashCode += Cursor.GetHashCode(); } if (LocationId != null) { hashCode += LocationId.GetHashCode(); } if (Total != null) { hashCode += Total.GetHashCode(); } if (Last4 != null) { hashCode += Last4.GetHashCode(); } if (CardBrand != null) { hashCode += CardBrand.GetHashCode(); } if (Limit != null) { hashCode += Limit.GetHashCode(); } return(hashCode); }
protected override void CalculateTime(DateTime now, out DateTime thisTime, out DateTime nextTime) { thisTime = BeginTime; if (now < thisTime) { nextTime = thisTime; } else { var days = (int)(now - BeginTime).TotalDays; nextTime = BeginTime.AddDays(RepeatPerDays * (days / RepeatPerDays + 1)); //在无重复的情况下下次的执行时间 thisTime = nextTime.AddDays(-RepeatPerDays); } }
protected override void Execute(CodeActivityContext context) { YunShanOA.BusinessLogic.UseCar.UsecarApplyformManager ApplyformManager = new BusinessLogic.UseCar.UsecarApplyformManager(); usecarapplyform myform = UpdateApplyInfo.Get(context); if (ReviewUseCarApplyForm.Get(context).Agree == 1) { myform.BeginTime = BeginTime.Get(context); } myform.ApplyStatus = 4; ApplyformManager.Sava(myform); OUTApplyForm.Set(context, myform); }
public virtual int CompareTo(EmployeeRelation entity) { if (entity == null) { return(-1); } int i = EmployeeID.CompareTo(entity.EmployeeID); if (i == 0) { i = BeginTime.CompareTo(entity.BeginTime); } return(i); }
public bool Equals(Lesson other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Level == other.Level && IsOnEvenWeek == other.IsOnEvenWeek && string.Equals(Discipline, other.Discipline) && string.Equals(Teacher, other.Teacher) && string.Equals(Place, other.Place) && BeginTime.Equals(other.BeginTime) && string.Equals(Notation, other.Notation) && Duration.Equals(other.Duration) && Elems.UnorderEquals(other.Elems)); }
public override int GetHashCode() { unchecked { var hashCode = (int)Level; hashCode = (hashCode * 397) ^ (Elems != null ? Elems.GetHashCode() : 0); hashCode = (hashCode * 397) ^ IsOnEvenWeek.GetHashCode(); hashCode = (hashCode * 397) ^ (Discipline != null ? Discipline.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Teacher != null ? Teacher.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Place != null ? Place.GetHashCode() : 0); hashCode = (hashCode * 397) ^ BeginTime.GetHashCode(); hashCode = (hashCode * 397) ^ Duration.GetHashCode(); hashCode = (hashCode * 397) ^ (Notation != null ? Notation.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { int hashCode = -211695136; if (BeginTime != null) { hashCode += BeginTime.GetHashCode(); } if (EndTime != null) { hashCode += EndTime.GetHashCode(); } if (SortOrder != null) { hashCode += SortOrder.GetHashCode(); } if (Cursor != null) { hashCode += Cursor.GetHashCode(); } if (LocationId != null) { hashCode += LocationId.GetHashCode(); } if (Status != null) { hashCode += Status.GetHashCode(); } if (SourceType != null) { hashCode += SourceType.GetHashCode(); } if (Limit != null) { hashCode += Limit.GetHashCode(); } return(hashCode); }
protected void GetQueryString() { HeadControl1.IsPlatSingle = true; HeadControl1.IsHasNoPlat = false; HeadControl1.IsSoftSingle = true; HeadControl1.HiddenTime = true; HeadControl1.MySupportSoft = AvailableSofts; //其他页面传递过来 if (HeadControl1.IsFirstLoad && string.IsNullOrEmpty(Request["inputsoftselect"])) { SoftID = CookieSoftid; PlatID = CookiePlatid; EndTimeForHour = UtilityService.GetInstance().GetMaxTimeCache(net91com.Stat.Core.PeriodOptions.Daily, ReportType.SoftUserForHour, CacheTimeOption.TenMinutes); EndTime = UtilityService.GetInstance().GetMaxTimeCache(net91com.Stat.Core.PeriodOptions.Daily, ReportType.UserUseNewActivity, CacheTimeOption.TenMinutes); BeginTime = EndTime.AddDays(-30); } //用户选择模式 else { if (!string.IsNullOrEmpty(Request["inputsoftselect"]) && !string.IsNullOrEmpty(Request["inputplatformselect"])) { PlatID = Convert.ToInt32(Request["inputplatformselect"]); SoftID = Convert.ToInt32(Request["inputsoftselect"]); } else { PlatID = Convert.ToInt32(HeadControl1.PlatID); SoftID = Convert.ToInt32(HeadControl1.SoftID); } EndTimeForHour = UtilityService.GetInstance().GetMaxTimeCache(net91com.Stat.Core.PeriodOptions.Daily, ReportType.SoftUserForHour, CacheTimeOption.TenMinutes); EndTime = UtilityService.GetInstance().GetMaxTimeCache(net91com.Stat.Core.PeriodOptions.Daily, ReportType.UserUseNewActivity, CacheTimeOption.TenMinutes); BeginTime = EndTime.AddDays(-30); SetRequestCookie(SoftID, PlatID); } HeadControl1.SoftID = SoftID.ToString(); HeadControl1.PlatID = PlatID.ToString(); //设置时段的时间和 最近30日的时间 DateTimeFor30 = EndTime.Date.ToShortDateString(); DateTimeSpan = EndTimeForHour.Date.ToShortDateString(); DateTimeFor30Begin = BeginTime.ToShortDateString(); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is ListTransactionsRequest other && ((BeginTime == null && other.BeginTime == null) || (BeginTime?.Equals(other.BeginTime) == true)) && ((EndTime == null && other.EndTime == null) || (EndTime?.Equals(other.EndTime) == true)) && ((SortOrder == null && other.SortOrder == null) || (SortOrder?.Equals(other.SortOrder) == true)) && ((Cursor == null && other.Cursor == null) || (Cursor?.Equals(other.Cursor) == true))); }
public EventDTO MakeDTO(bool favorite = false) { string languages = ""; if (EventLanguages.HasFlag(Language.English)) { languages += "english, "; } if (EventLanguages.HasFlag(Language.French)) { languages += "french, "; } if (EventLanguages.HasFlag(Language.German)) { languages += "german, "; } if (EventLanguages.HasFlag(Language.Hungarian)) { languages += "hungarian, "; } if (EventLanguages.HasFlag(Language.Russian)) { languages += "russian, "; } if (EventLanguages.HasFlag(Language.Spanish)) { languages += "spanish, "; } languages = languages.Substring(0, languages.Length - 2); var res = new EventDTO { event_id = Id, title = Title, description = $"The event available for people who speak {languages}. {Description}", isfavorite = favorite, beginning = BeginTime.ToString(), ending = EndTime.ToString() }; res.messages = new MessageDTO[(Messages?.Count).GetValueOrDefault(0)]; res.image = "data:image/jpeg;base64, " + Convert.ToBase64String(File.ReadAllBytes(Path.Combine(ImageRoot, ImageDict[EventInterest]))); for (int i = 0; i < res.messages.Length; i++) { res.messages[i] = Messages.ElementAt(i).MakeDTO(); } return(res); }
public override int GetHashCode() { int hash = 1; hash ^= securityList_.GetHashCode(); if (BeginTime.Length != 0) { hash ^= BeginTime.GetHashCode(); } if (EndTime.Length != 0) { hash ^= EndTime.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is V1ListRefundsRequest other && ((Order == null && other.Order == null) || (Order?.Equals(other.Order) == true)) && ((BeginTime == null && other.BeginTime == null) || (BeginTime?.Equals(other.BeginTime) == true)) && ((EndTime == null && other.EndTime == null) || (EndTime?.Equals(other.EndTime) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((BatchToken == null && other.BatchToken == null) || (BatchToken?.Equals(other.BatchToken) == true))); }
public override string ToString() { string str = ""; str += string.Format("数据时间 : {0}", CountTime.HasValue?CountTime.Value.ToString("yyyy-MM-dd") : "<NULL>") + "\n"; str += string.Format("数据大小 : {0} <{1}>", TotalBytes, GetSizeStr(TotalBytes)) + "\n"; str += string.Format("文件总数 : {0}", GetFileCount()) + "\n"; str += "文件列表 : [\n"; int i = 1; foreach (string f in DataPath) { str += string.Format("\t\t{0,4}、 {1}", i++, f) + "\n"; } str += "\t ]\n"; str += string.Format("开始时间 : {0}\n", BeginTime.ToString("yyyy-MM-dd HH:mm:ss")); str += string.Format("结束时间 : {0}\n", FinishTime.ToString("yyyy-MM-dd HH:mm:ss")); return(str); }
public override int GetHashCode() { int hash = 1; if (RehabType != 0) { hash ^= RehabType.GetHashCode(); } if (KlType != 0) { hash ^= KlType.GetHashCode(); } if (security_ != null) { hash ^= Security.GetHashCode(); } if (BeginTime.Length != 0) { hash ^= BeginTime.GetHashCode(); } if (EndTime.Length != 0) { hash ^= EndTime.GetHashCode(); } if (MaxAckKLNum != 0) { hash ^= MaxAckKLNum.GetHashCode(); } if (NeedKLFieldsFlag != 0L) { hash ^= NeedKLFieldsFlag.GetHashCode(); } if (NextReqKey.Length != 0) { hash ^= NextReqKey.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is ListCashDrawerShiftsRequest other && ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true)) && ((SortOrder == null && other.SortOrder == null) || (SortOrder?.Equals(other.SortOrder) == true)) && ((BeginTime == null && other.BeginTime == null) || (BeginTime?.Equals(other.BeginTime) == true)) && ((EndTime == null && other.EndTime == null) || (EndTime?.Equals(other.EndTime) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((Cursor == null && other.Cursor == null) || (Cursor?.Equals(other.Cursor) == true))); }
/// <summary> /// 形成每一个tab /// </summary> /// <param name="users"></param> /// <param name="tableindex"></param> /// <returns></returns> protected string GetOneTableHtml(List <SoftUser> users, int tableindex) { users = users.OrderByDescending(p => p.StatDate).ToList(); string tableName = string.Empty; tableName = users[0].SoftId + "_" + users[0].Platform + "_" + BeginTime.ToShortDateString() + "_" + EndTime.ToShortDateString() + "_" + (int)Period; StringBuilder sb; if (tableindex == 0) { sb = new StringBuilder(string.Format("<table id=\"tab{0}\" name=\"" + tableName + "\" class=\" tablesorter \" cellspacing=\"1\">", tableindex)); } else { sb = new StringBuilder(string.Format("<table id=\"tab{0}\" name=\"" + tableName + "\" class=\" tablesorter \" style=\"display:none\" cellspacing=\"1\">", tableindex)); } return(TableHelper.BuildUserLostUsers(users, tableName, tableindex, Period, false)); }
public override int GetHashCode() { int hashCode = 405501134; if (Cursor != null) { hashCode += Cursor.GetHashCode(); } if (ObjectTypes != null) { hashCode += ObjectTypes.GetHashCode(); } if (IncludeDeletedObjects != null) { hashCode += IncludeDeletedObjects.GetHashCode(); } if (IncludeRelatedObjects != null) { hashCode += IncludeRelatedObjects.GetHashCode(); } if (BeginTime != null) { hashCode += BeginTime.GetHashCode(); } if (Query != null) { hashCode += Query.GetHashCode(); } if (Limit != null) { hashCode += Limit.GetHashCode(); } return(hashCode); }
private void CalculateSAScore(DateTime StartTime, DateTime EndTime) { KPI_SATagValueEntity SATagValue; List <KPI_SATagEntity> SATagList; this.BeginTime = StartTime; //开始时间 this.EndTime = EndTime; m_Log.Info("开始计算安全得分"); m_Log.InfoFormat("开始时间:{0} 结束时间:{1}", BeginTime.ToString("yyyy-MM-dd HH:mm:ss"), EndTime.ToString("yyyy-MM-dd HH:mm:ss")); using (KPI_SATagDal DataAccess = new KPI_SATagDal()) { foreach (KPI_UnitEntity Unit in m_UnitList) { if (UnitIsRunning(Unit.UnitID) == false) { continue; //机组停运不计算得分 } CurrentWorkInfo WorkInfo = GetWorkInfo(Unit.UnitID, BeginTime); //获取当前值次、班次相关信息 SATagValue = new KPI_SATagValueEntity(); SATagValue.Shift = WorkInfo.Shift; SATagValue.Period = WorkInfo.Period; SATagValue.CalcDateTime = EndTime; SATagList = DataAccess.GetSATagList(Unit.UnitID); foreach (KPI_SATagEntity SATag in SATagList) { SATagValue.SAID = SATag.SAID; SATagValue.SAScore = Convert.ToDecimal(m_Parser.Evaluate(SATag.SACalcExp)); //计算安全得分 //Console.WriteLine(SATag.SACountExpression); SATagValue.TotalCount = Convert.ToInt32(m_Parser.Evaluate(SATag.SACountExpression)); //计算超限次数 SATagValue.TotalDuration = Convert.ToDecimal(m_Parser.Evaluate(SATag.SADurationExpression)); //计算超限时长 if (SATagValue.TotalCount > 0) { m_DataAccess.SaveKPI_SATagValue(SATagValue); } } SATagList.Clear(); } } //Console.WriteLine("安全得分计算结束"); m_Log.Info("安全得分计算结束"); }
/// <summary> /// 形成每一个tab /// </summary> /// <returns></returns> protected string GetTableString(List <LinkTagCount> data, int tableindex) { data = data.OrderByDescending(p => p.StatDate).ToList(); string tableName = string.Empty; if (HeadControl1.LinkTag1.Values.Count == 0) { // soft_plat_begin_end_tagid_tagtype tableName = data[0].SoftId + "_" + data[0].Platform + "_" + BeginTime.ToShortDateString() + "_" + EndTime.ToShortDateString() + "_0_0"; } else { var tags = HeadControl1.LinkTag1.Values; tableName = data[0].SoftId + "_" + data[0].Platform + "_" + BeginTime.ToShortDateString() + "_" + EndTime.ToShortDateString() + "_" + tags[LinkTagIdList[tableindex]].TagValue + "_" + (tags[LinkTagIdList[tableindex]].IsCategory ? "1" : "0"); } return(TableHelper.BuildLinkTagTable(data, false, tableindex, tableName)); }
/// <summary> /// ローソク足データ /// 親ローソクメーカー新規用 /// タイムスタンプは時間足の単位で切り捨てるが、1日以上は切り捨てないことに注意。 /// </summary> /// <param name="board">板</param> /// <param name="timeScale">時間足</param> /// <param name="ticker">現在のTicker</param> public Candle(MBoard board, MTimeScale timeScale, Ticker ticker) { MBoard = board; MTimeScale = timeScale; // 切り捨てて、ローソクの開始時刻を求める BeginTime = ticker.Timestamp; int TimeSeconds = ((BeginTime.Hour * 60 + BeginTime.Minute) * 60 + BeginTime.Second); BeginTime = BeginTime.AddSeconds(-(TimeSeconds % MTimeScale.SecondsValue)); BeginTime.AddMilliseconds(-BeginTime.Millisecond); // ミリ秒切り捨て // 終了時刻を求める EndTime = BeginTime.AddSeconds(MTimeScale.SecondsValue); Min = ticker.Ltp; Max = ticker.Ltp; Begin = ticker.Ltp; End = ticker.Ltp; Volume = ticker.Volume; }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is SearchCatalogObjectsRequest other && ((Cursor == null && other.Cursor == null) || (Cursor?.Equals(other.Cursor) == true)) && ((ObjectTypes == null && other.ObjectTypes == null) || (ObjectTypes?.Equals(other.ObjectTypes) == true)) && ((IncludeDeletedObjects == null && other.IncludeDeletedObjects == null) || (IncludeDeletedObjects?.Equals(other.IncludeDeletedObjects) == true)) && ((IncludeRelatedObjects == null && other.IncludeRelatedObjects == null) || (IncludeRelatedObjects?.Equals(other.IncludeRelatedObjects) == true)) && ((BeginTime == null && other.BeginTime == null) || (BeginTime?.Equals(other.BeginTime) == true)) && ((Query == null && other.Query == null) || (Query?.Equals(other.Query) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true))); }
public string ToString(string dateFormat, string timeFormat, string timeStyle) { var dateTimeTime = string.IsNullOrEmpty(timeStyle) ? "{0} {1} ~ {2}" : string.Format("{{0}} <{0}>{{1}} ~ {{2}}</{0}>", timeStyle); var dateTimeDateTime = string.IsNullOrEmpty(timeStyle) ? "{0} {1} ~ {2} {3}" : string.Format("{{0}} <{0}>{{1}}</{0}> ~ {{2}} <{0}>{{3}}</{0}>", timeStyle); if (BeginTime.Date.Equals(EndTime.Date)) { return(string.Format(dateTimeTime, BeginTime.ToString(dateFormat), BeginTime.ToString(timeFormat), EndTime.ToString(timeFormat))); } else { return(string.Format(dateTimeDateTime, BeginTime.ToString(dateFormat), BeginTime.ToString(timeFormat), EndTime.ToString(dateFormat), EndTime.ToString(timeFormat))); } }