public override int GetHashCode() { int hash = 1; if (id_ != null) { hash ^= Id.GetHashCode(); } if (length_ != null) { hash ^= Length.GetHashCode(); } if (OriginatingTrunk.Length != 0) { hash ^= OriginatingTrunk.GetHashCode(); } if (NumberDialed.Length != 0) { hash ^= NumberDialed.GetHashCode(); } if (charged_ != null) { hash ^= Charged.GetHashCode(); } if (property_ != null) { hash ^= Property.GetHashCode(); } if (recordedAt_ != null) { hash ^= RecordedAt.GetHashCode(); } return(hash); }
public void MergeFrom(RecordedPhoneCall other) { if (other == null) { return; } if (other.id_ != null) { if (id_ == null) { id_ = new global::HOLMS.Types.Operations.PBXEvents.PbxEventIndicator(); } Id.MergeFrom(other.Id); } if (other.length_ != null) { if (length_ == null) { length_ = new global::Google.Protobuf.WellKnownTypes.Duration(); } Length.MergeFrom(other.Length); } if (other.OriginatingTrunk.Length != 0) { OriginatingTrunk = other.OriginatingTrunk; } if (other.NumberDialed.Length != 0) { NumberDialed = other.NumberDialed; } if (other.charged_ != null) { if (charged_ == null) { charged_ = new global::HOLMS.Types.Primitive.MonetaryAmount(); } Charged.MergeFrom(other.Charged); } if (other.property_ != null) { if (property_ == null) { property_ = new global::HOLMS.Types.TenancyConfig.Indicators.PropertyIndicator(); } Property.MergeFrom(other.Property); } if (other.recordedAt_ != null) { if (recordedAt_ == null) { recordedAt_ = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } RecordedAt.MergeFrom(other.RecordedAt); } }
public static StatusReport GetChargeList(string homeNumber, string name, string ztcode, string buildingNumber) { StatusReport sr = new StatusReport(); string sqlString = "SELECT 资源编号, 占用者名称, SUM(应收金额) AS 已收总额, 帐套代码 " + "FROM 小程序_未收查询 " + "WHERE 帐套代码 = " + ztcode + " and 收费状态 is null " + (string.IsNullOrEmpty(homeNumber) ? "" : "and (资源编号 like '%" + homeNumber + "%') ") + (string.IsNullOrEmpty(buildingNumber) ? "" : "and (所属楼宇 like '%" + buildingNumber + "%') ") + (string.IsNullOrEmpty(name) ? "" : "and (占用者名称 like '%" + name + "%') ") + "GROUP BY 资源编号, 占用者名称, 帐套代码 " + "ORDER BY 占用者名称"; DataTable dt = SQLHelper.ExecuteQuery("wyt", sqlString); if (dt.Rows.Count == 0) { sr.status = "Fail"; sr.result = "未查询到任何记录"; sr.parameters = sqlString; return(sr); } List <Charged> chargedList = new List <Charged>(); foreach (DataRow row in dt.Rows) { Charged c = new Charged() { RoomNumber = DataTypeHelper.GetStringValue(row["资源编号"]), Name = DataTypeHelper.GetStringValue(row["占用者名称"]), Total = DataTypeHelper.GetDoubleValue(row["已收总额"]), ZTCode = DataTypeHelper.GetStringValue(row["帐套代码"]), }; chargedList.Add(c); } sr.status = "Success"; sr.result = "成功"; sr.data = chargedList.ToArray(); return(sr); }