Beispiel #1
0
        public void TreeFresh(Ts tsTest)
        {
            treeView1.Nodes.Clear();
            TreeNode tn1 = new TreeNode();

            tn1.Tag  = tsTest;
            tn1.Text = "TSID:" + tsTest.TSID;
            foreach (var tserrorcode in tsTest.tsErrorCodes)
            {
                TreeNode tn2 = new TreeNode();
                tn2.Tag  = tserrorcode;
                tn2.Text = tserrorcode.errorCode.ecdesc;
                if (tserrorcode.tsErrorCauses != null)
                {
                    foreach (var tserrorcause in tserrorcode.tsErrorCauses)
                    {
                        TreeNode tn3 = new TreeNode();
                        tn3.Tag  = tserrorcause;
                        tn3.Text = tserrorcause.errorCodeSeason.ecsdesc;
                        tn2.Nodes.Add(tn3);
                    }
                }

                tn1.Nodes.Add(tn2);
            }
            treeView1.Nodes.Add(tn1);
            treeView1.ExpandAll();
        }
        private void UpdateList()
        {
            ListOfTeams.Items.Clear();
            List <Team> Ts;

            if (FlyModelsList.SelectedIndex == TimerSettings.Competition.Teams.TeamClumps.Count)
            {
                Ts = TimerSettings.Competition.Teams.GetTeams();
            }
            else if (FlyModelsList.SelectedIndex < TimerSettings.Competition.Teams.TeamClumps.Count)
            {
                Ts = TimerSettings.Competition.Teams.TeamClumps[FlyModelsList.SelectedIndex].Teams();
            }
            else
            {
                Ts = TimerSettings.Competition.Teams.AllTeams.FindAll(delegate(Team T) { return(T.CM.TeamSets.Find(delegate(TeamSet tset) { return tset.ShareSamePerson(T); }) == null); });
            }
            List <Team> TsFiltered;

            if (searchBox.Text != "")
            {
                TsFiltered = Ts.FindAll(delegate(Team T) { return(T.Pilot.Name.Contains(searchBox.Text) | T.Mechanic.Name.Contains(searchBox.Text)); });
            }
            else
            {
                TsFiltered = Ts;
            }
            ListOfTeams.Items.AddRange(TsFiltered.ToArray());
        }
    public override string ToString()
    {
        var tmp95 = new StringBuilder("SpecIntervalUpdateSerial(");
        int tmp96 = 0;

        if (__isset.ts)
        {
            if (0 < tmp96++)
            {
                tmp95.Append(", ");
            }
            tmp95.Append("Ts: ");
            Ts.ToString(tmp95);
        }
        if ((V != null) && __isset.v)
        {
            if (0 < tmp96++)
            {
                tmp95.Append(", ");
            }
            tmp95.Append("V: ");
            V.ToString(tmp95);
        }
        if (__isset.encoder)
        {
            if (0 < tmp96++)
            {
                tmp95.Append(", ");
            }
            tmp95.Append("Encoder: ");
            Encoder.ToString(tmp95);
        }
        tmp95.Append(')');
        return(tmp95.ToString());
    }
Beispiel #4
0
    public override string ToString()
    {
        var tmp355 = new StringBuilder("KCellSerial(");
        int tmp356 = 0;

        if ((C != null) && __isset.c)
        {
            if (0 < tmp356++)
            {
                tmp355.Append(", ");
            }
            tmp355.Append("C: ");
            C.ToString(tmp355);
        }
        if (__isset.ts)
        {
            if (0 < tmp356++)
            {
                tmp355.Append(", ");
            }
            tmp355.Append("Ts: ");
            Ts.ToString(tmp355);
        }
        if ((V != null) && __isset.v)
        {
            if (0 < tmp356++)
            {
                tmp355.Append(", ");
            }
            tmp355.Append("V: ");
            V.ToString(tmp355);
        }
        tmp355.Append(')');
        return(tmp355.ToString());
    }
Beispiel #5
0
        /// <summary>
        ///     Execute operation
        /// </summary>
        public override void Execute()
        {
            Ts.CurrentTb.ExpandBlock(Ts.CurrentTb.Selection.Start.ILine);
            var s = C.ToString();

            Ts.OnTextChanging(ref s);
            if (s.Length == 1)
            {
                C = s[0];
            }

            if (string.IsNullOrEmpty(s))
            {
                throw new ArgumentOutOfRangeException();
            }


            if (Ts.Count == 0)
            {
                InsertLine(Ts);
            }
            InsertChar(C, ref _deletedChar, Ts);

            Ts.NeedRecalc(new TextSource.TextChangedEventArgs(Ts.CurrentTb.Selection.Start.ILine,
                                                              Ts.CurrentTb.Selection.Start.ILine));
            base.Execute();
        }
Beispiel #6
0
    public override string ToString()
    {
        var tmp377 = new StringBuilder("FCell(");
        int tmp378 = 0;

        if ((C != null) && __isset.c)
        {
            if (0 < tmp378++)
            {
                tmp377.Append(", ");
            }
            tmp377.Append("C: ");
            C.ToString(tmp377);
        }
        if (__isset.ts)
        {
            if (0 < tmp378++)
            {
                tmp377.Append(", ");
            }
            tmp377.Append("Ts: ");
            Ts.ToString(tmp377);
        }
        if ((V != null) && __isset.v)
        {
            if (0 < tmp378++)
            {
                tmp377.Append(", ");
            }
            tmp377.Append("V: ");
            V.ToString(tmp377);
        }
        tmp377.Append(')');
        return(tmp377.ToString());
    }
Beispiel #7
0
        /// <summary>
        ///     Execute operation
        /// </summary>
        public override void Execute()
        {
            var tb = Ts.CurrentTb;

            _prevText.Clear();

            Ts.OnTextChanging(ref _insertedText);

            tb.Selection.BeginUpdate();
            tb.BeginUpdate();
            for (var i = _ranges.Count - 1; i >= 0; i--)
            {
                tb.Selection.Start = _ranges[i].Start;
                tb.Selection.End   = _ranges[i].End;
                _prevText.Add(tb.Selection.Text);
                ClearSelected(Ts);
                if (_insertedText != "")
                {
                    InsertTextCommand.InsertText(_insertedText, Ts);
                }
            }
            if (_ranges.Count > 0)
            {
                Ts.OnTextChanged(_ranges[0].Start.ILine, _ranges[_ranges.Count - 1].End.ILine);
            }
            tb.EndUpdate();
            tb.Selection.EndUpdate();
            Ts.NeedRecalc(new TextSource.TextChangedEventArgs(0, 1));

            LastSel = new RangeInfo(tb.Selection);
        }
Beispiel #8
0
        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);
        }
Beispiel #9
0
        /// <summary>
        /// 重写了TO STRING
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            var t = Ts.ToString("yyyy-MM-dd_HH:mm:ss");
            var s = (int)TsType;

            return(t + s.ToString(CultureInfo.InvariantCulture));
        }
Beispiel #10
0
        /// <summary>
        ///     Undo operation
        /// </summary>
        public override void Undo()
        {
            var tb = Ts.CurrentTb;

            Ts.OnTextChanging();
            tb.BeginUpdate();

            tb.Selection.BeginUpdate();
            for (var i = 0; i < _ranges.Count; i++)
            {
                tb.Selection.Start = _ranges[i].Start;
                for (var j = 0; j < _insertedText.Length; j++)
                {
                    tb.Selection.GoRight(true);
                }
                ClearSelected(Ts);
                InsertTextCommand.InsertText(_prevText[_prevText.Count - i - 1], Ts);
            }
            tb.Selection.EndUpdate();
            tb.EndUpdate();

            if (_ranges.Count > 0)
            {
                Ts.OnTextChanged(_ranges[0].Start.ILine, _ranges[_ranges.Count - 1].End.ILine);
            }

            Ts.NeedRecalc(new TextSource.TextChangedEventArgs(0, 1));
        }
Beispiel #11
0
    public override int GetHashCode()
    {
        int hashcode = 157;

        unchecked {
            if (__isset.f)
            {
                hashcode = (hashcode * 397) + F.GetHashCode();
            }
            if ((K != null) && __isset.k)
            {
                hashcode = (hashcode * 397) + K.GetHashCode();
            }
            if (__isset.ts)
            {
                hashcode = (hashcode * 397) + Ts.GetHashCode();
            }
            if (__isset.ts_desc)
            {
                hashcode = (hashcode * 397) + Ts_desc.GetHashCode();
            }
            if ((V != null) && __isset.v)
            {
                hashcode = (hashcode * 397) + V.GetHashCode();
            }
            if (__isset.encoder)
            {
                hashcode = (hashcode * 397) + Encoder.GetHashCode();
            }
        }
        return(hashcode);
    }
Beispiel #12
0
    public override string ToString()
    {
        var tmp315 = new StringBuilder("CCell(");
        int tmp316 = 0;

        if ((K != null) && __isset.k)
        {
            if (0 < tmp316++)
            {
                tmp315.Append(", ");
            }
            tmp315.Append("K: ");
            K.ToString(tmp315);
        }
        if (__isset.ts)
        {
            if (0 < tmp316++)
            {
                tmp315.Append(", ");
            }
            tmp315.Append("Ts: ");
            Ts.ToString(tmp315);
        }
        if ((V != null) && __isset.v)
        {
            if (0 < tmp316++)
            {
                tmp315.Append(", ");
            }
            tmp315.Append("V: ");
            V.ToString(tmp315);
        }
        tmp315.Append(')');
        return(tmp315.ToString());
    }
Beispiel #13
0
        private static Ts CreateTsMuxing(Stream stream, BaseOutput output, string outputPath,
                                         double?segmentLength)
        {
            var encodingOutput = new Encoding.Output
            {
                OutputPath = outputPath,
                OutputId   = output.Id,
                Acl        = new List <Acl> {
                    new Acl {
                        Permission = Permission.PUBLIC_READ
                    }
                }
            };

            var muxing = new Ts
            {
                Outputs = new List <Encoding.Output> {
                    encodingOutput
                },
                Streams = new List <MuxingStream> {
                    new MuxingStream {
                        StreamId = stream.Id
                    }
                },
                SegmentNaming = "segment_%number%.ts",
                SegmentLength = segmentLength
            };

            return(muxing);
        }
        protected virtual void OnTextChanged(bool invert)
        {
            var b = Sel.Start.ILine < LastSel.Start.ILine;

            if (invert)
            {
                if (b)
                {
                    Ts.OnTextChanged(Sel.Start.ILine, Sel.Start.ILine);
                }
                else
                {
                    Ts.OnTextChanged(Sel.Start.ILine, LastSel.Start.ILine);
                }
            }
            else
            {
                if (b)
                {
                    Ts.OnTextChanged(Sel.Start.ILine, LastSel.Start.ILine);
                }
                else
                {
                    Ts.OnTextChanged(LastSel.Start.ILine, LastSel.Start.ILine);
                }
            }
        }
Beispiel #15
0
        public AccountMsg deposit(dwacc value)
        {
            string              data     = JsonConvert.SerializeObject(value);
            StringContent       content  = new StringContent(data, Encoding.UTF8, "application/json");
            HttpResponseMessage response = client.PostAsync(client.BaseAddress + "/Transaction/deposit/", content).Result;

            if (response.IsSuccessStatusCode)
            {
                string data1 = response.Content.ReadAsStringAsync().Result;
                Ts     s1    = JsonConvert.DeserializeObject <Ts>(data1);
                if (s1.Message == "Success")
                {
                    if (value.AccountId % 2 == 0)
                    {
                        var sa = savingsAccounts.Find(a => a.savingsAccountId == value.AccountId);
                        sa.savingsAccountbalance = sa.savingsAccountbalance + value.Balance;
                        AccountMsg sob = new AccountMsg
                        {
                            accountId = value.AccountId,
                            AccType   = "Deposited Correctly",
                            AccBal    = sa.savingsAccountbalance
                        };
                        return(sob);
                    }
                    var ca = currentAccounts.Find(a => a.CAId == value.AccountId);
                    ca.CBal = ca.CBal + value.Balance;
                    AccountMsg cob = new AccountMsg
                    {
                        accountId = value.AccountId,
                        AccType   = "Deposited Correctly",
                        AccBal    = ca.CBal
                    };
                    return(cob);
                }

                /* if (value.AccountId % 2 == 0)
                 * {
                 *   var sad = savingsAccounts.Find(a => a.savingsAccountId == value.AccountId);
                 *   sad.savingsAccountbalance = sad.savingsAccountbalance + value.Balance;
                 *   AccountMsg sobd = new AccountMsg
                 *   {
                 *       accountId = value.AccountId,
                 *       AccType = "Deposited Correctly",
                 *       AccBal = sad.savingsAccountbalance
                 *   };
                 *   return sobd;
                 * }
                 * var cad = currentAccounts.Find(a => a.CAId == value.AccountId);
                 * cad.CBal = cad.CBal + value.Balance;
                 * AccountMsg cobd = new AccountMsg
                 * {
                 *   accountId = value.AccountId,
                 *   AccType = "Deposited Correctly",
                 *   AccBal = cad.CBal
                 * };
                 * return cobd;*/
            }
            return(null);
        }
Beispiel #16
0
 /// <summary>
 ///     Undo operation
 /// </summary>
 public override void Undo()
 {
     Ts.CurrentTb.Selection.Start = Sel.Start;
     Ts.CurrentTb.Selection.End   = LastSel.Start;
     Ts.OnTextChanging();
     ClearSelectedCommand.ClearSelected(Ts);
     base.Undo();
 }
Beispiel #17
0
 private static void CheckGenericWithStructRestrictionAsValueTypeHelper <Ts>() where Ts : struct
 {
     Ts[] array = new Ts[] { default(Ts), new Ts() };
     for (int i = 0; i < array.Length; i++)
     {
         VerifyGenericWithStructRestrictionAsValueType <Ts>(array[i]);
     }
 }
Beispiel #18
0
        public void Aus()
        {
            TimeSpan tsTmp = DateTime.Now - tmpTime;

            Ts   = Ts.Add(tsTmp);
            Log += "\nEnde um " + DateTime.Now.ToShortTimeString();
            Log += "\n=> " + GetFormat(tsTmp);
        }
Beispiel #19
0
 /// <summary>
 ///     Undo operation
 /// </summary>
 public override void Undo()
 {
     Ts.CurrentTb.Selection.Start = new Place(Sel.FromX, Math.Min(Sel.Start.ILine, Sel.End.ILine));
     Ts.OnTextChanging();
     InsertTextCommand.InsertText(_deletedText, Ts);
     Ts.OnTextChanged(Sel.Start.ILine, Sel.End.ILine);
     Ts.CurrentTb.Selection.Start = Sel.Start;
     Ts.CurrentTb.Selection.End   = Sel.End;
 }
        /// <summary>
        ///     Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                var hash = 41;
                // Suitable nullity checks etc, of course :)

                if (ContentType != null)
                {
                    hash = hash * 57 + ContentType.GetHashCode();
                }

                if (Slug != null)
                {
                    hash = hash * 57 + Slug.GetHashCode();
                }

                if (UserAgent != null)
                {
                    hash = hash * 57 + UserAgent.GetHashCode();
                }

                if (Id != null)
                {
                    hash = hash * 57 + Id.GetHashCode();
                }

                if (Rid != null)
                {
                    hash = hash * 57 + Rid.GetHashCode();
                }

                if (Ts != null)
                {
                    hash = hash * 57 + Ts.GetHashCode();
                }

                if (Self != null)
                {
                    hash = hash * 57 + Self.GetHashCode();
                }

                if (Etag != null)
                {
                    hash = hash * 57 + Etag.GetHashCode();
                }

                if (Permissions != null)
                {
                    hash = hash * 57 + Permissions.GetHashCode();
                }

                return(hash);
            }
        }
Beispiel #21
0
 private void MainWindow_Shown(Object sender, EventArgs e)
 {
     //Check the translation
     if (!Internet || Ts.Version == 0 || !Ts.CheckVersion())
     {
         return;
     }
     MessageBox.Show("Hay una nueva actualización disponible, se procederá a instalarse.", "Nueva actualización disponible", MessageBoxButtons.OK, MessageBoxIcon.Information);
     _ = ApplyTranslation(false, true);
 }
        /// <summary>
        ///     Returns true if AttachmentRaw instances are equal
        /// </summary>
        /// <param name="other">Instance of AttachmentRaw to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(AttachmentRaw other)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            if (other == null)
            {
                return(false);
            }

            return
                ((
                     ContentType == other.ContentType ||
                     ContentType != null &&
                     ContentType.Equals(other.ContentType)
                     ) &&
                 (
                     Slug == other.Slug ||
                     Slug != null &&
                     Slug.Equals(other.Slug)
                 ) &&
                 (
                     UserAgent == other.UserAgent ||
                     UserAgent != null &&
                     UserAgent.Equals(other.UserAgent)
                 ) &&
                 (
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Rid == other.Rid ||
                     Rid != null &&
                     Rid.Equals(other.Rid)
                 ) &&
                 (
                     Ts == other.Ts ||
                     Ts != null &&
                     Ts.Equals(other.Ts)
                 ) &&
                 (
                     Self == other.Self ||
                     Self != null &&
                     Self.Equals(other.Self)
                 ) &&
                 (
                     Etag == other.Etag ||
                     Etag != null &&
                     Etag.Equals(other.Etag)
                 ) &&
                 (
                     Permissions == other.Permissions ||
                     Permissions != null &&
                     Permissions.Equals(other.Permissions)
                 ));
        }
Beispiel #23
0
 public void GetParameters()
 {
     KaTb.Text      = K.ToString() + ";";
     tetanaTb.Text  = Tn.ToString() + ";";
     tetasaTb.Text  = Ts.ToString() + ";";
     tetacaTb.Text  = Tc.ToString() + ";";
     NcaTb.Text     = Nc.ToString() + ";";
     LaTb.Text      = L.ToString() + ";";
     lowerkaTb.Text = k.ToString() + ";";
     IaTb.Text      = i.ToString() + ";";
 }
        /// <summary>
        ///     Returns true if Profitability instances are equal
        /// </summary>
        /// <param name="other">Instance of Profitability to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Profitability other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Roe == other.Roe ||
                     Roe != null &&
                     Roe.Equals(other.Roe)
                     ) &&
                 (
                     Npm == other.Npm ||
                     Npm != null &&
                     Npm.Equals(other.Npm)
                 ) &&
                 (
                     Gpm == other.Gpm ||
                     Gpm != null &&
                     Gpm.Equals(other.Gpm)
                 ) &&
                 (
                     Np == other.Np ||
                     Np != null &&
                     Np.Equals(other.Np)
                 ) &&
                 (
                     Eps == other.Eps ||
                     Eps != null &&
                     Eps.Equals(other.Eps)
                 ) &&
                 (
                     Mbr == other.Mbr ||
                     Mbr != null &&
                     Mbr.Equals(other.Mbr)
                 ) &&
                 (
                     Ts == other.Ts ||
                     Ts != null &&
                     Ts.Equals(other.Ts)
                 ) &&
                 (
                     Cs == other.Cs ||
                     Cs != null &&
                     Cs.Equals(other.Cs)
                 ));
        }
Beispiel #25
0
        public OperationResult TsCompleteCheck(string card)
        {
            OperationResult operationResult = new OperationResult(OperationResultType.Error);

            if (card == null)
            {
                operationResult.Message = "条码不能为空";
                return(operationResult);
            }
            Ts ts = TsFormService.Tss().Where(t => t.rcard == card).OrderByDescending(t => t.TSID).FirstOrDefault();

            if (ts == null)
            {
                operationResult.Message = "该产品没有登记不良品";
                return(operationResult);
            }
            if (!(ts.tsstatus == TsStatus.CONFIRM))
            {
                operationResult.Message = "该产品状态不对";
                return(operationResult);
            }

            foreach (var ter in ts.tsErrorCodes.ToList())
            {
                if (ter.tsErrorCauses.Count == 0)
                {
                    operationResult.Message = "该产品维修中";
                    return(operationResult);
                }
            }
            Item item = (Item)ItemFormService.FindEntity(ts.itemcode).AppendData;

            if (item == null)
            {
                operationResult.Message = "该产品不存在";
                return(operationResult);
            }
            List <Route> list = item.Routes.ToList();

            foreach (var route in list)
            {
                route.Ops.ToList();
            }
            TsCompleteModel tsCompleteModel = new TsCompleteModel();

            tsCompleteModel.ts         = ts;
            tsCompleteModel.list       = list;
            operationResult.ResultType = OperationResultType.Success;
            operationResult.Message    = "检测成功";
            operationResult.AppendData = tsCompleteModel;
            return(operationResult);
        }
Beispiel #26
0
        /// <summary>
        ///     Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                var hash = 41;
                // Suitable nullity checks etc, of course :)

                if (Id != null)
                {
                    hash = hash * 57 + Id.GetHashCode();
                }

                if (PermissionMode != null)
                {
                    hash = hash * 57 + PermissionMode.GetHashCode();
                }

                if (Resource != null)
                {
                    hash = hash * 57 + Resource.GetHashCode();
                }

                if (Rid != null)
                {
                    hash = hash * 57 + Rid.GetHashCode();
                }

                if (Ts != null)
                {
                    hash = hash * 57 + Ts.GetHashCode();
                }

                if (Self != null)
                {
                    hash = hash * 57 + Self.GetHashCode();
                }

                if (Etag != null)
                {
                    hash = hash * 57 + Etag.GetHashCode();
                }

                if (Token != null)
                {
                    hash = hash * 57 + Token.GetHashCode();
                }

                return(hash);
            }
        }
        /// <summary>
        ///     Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                var hash = 41;
                // Suitable nullity checks etc, of course :)

                if (Id != null)
                {
                    hash = hash * 57 + Id.GetHashCode();
                }

                if (Rid != null)
                {
                    hash = hash * 57 + Rid.GetHashCode();
                }

                if (Databases != null)
                {
                    hash = hash * 57 + Databases.GetHashCode();
                }

                if (Ts != null)
                {
                    hash = hash * 57 + Ts.GetHashCode();
                }

                if (Self != null)
                {
                    hash = hash * 57 + Self.GetHashCode();
                }

                if (Etag != null)
                {
                    hash = hash * 57 + Etag.GetHashCode();
                }

                if (Colls != null)
                {
                    hash = hash * 57 + Colls.GetHashCode();
                }

                if (Users != null)
                {
                    hash = hash * 57 + Users.GetHashCode();
                }

                return(hash);
            }
        }
Beispiel #28
0
        /// <summary>
        ///     Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                var hash = 41;
                // Suitable nullity checks etc, of course :)

                if (Id != null)
                {
                    hash = hash * 57 + Id.GetHashCode();
                }

                if (Body != null)
                {
                    hash = hash * 57 + Body.GetHashCode();
                }

                if (TriggerOperation != null)
                {
                    hash = hash * 57 + TriggerOperation.GetHashCode();
                }

                if (TriggerType != null)
                {
                    hash = hash * 57 + TriggerType.GetHashCode();
                }

                if (Rid != null)
                {
                    hash = hash * 57 + Rid.GetHashCode();
                }

                if (Ts != null)
                {
                    hash = hash * 57 + Ts.GetHashCode();
                }

                if (Self != null)
                {
                    hash = hash * 57 + Self.GetHashCode();
                }

                if (Etag != null)
                {
                    hash = hash * 57 + Etag.GetHashCode();
                }

                return(hash);
            }
        }
        /// <summary>
        ///     Returns true if DatabaseCollection instances are equal
        /// </summary>
        /// <param name="other">Instance of DatabaseCollection to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DatabaseCollection other)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            if (other == null)
            {
                return(false);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Rid == other.Rid ||
                     Rid != null &&
                     Rid.Equals(other.Rid)
                 ) &&
                 (
                     Databases == other.Databases ||
                     Databases != null &&
                     Databases.SequenceEqual(other.Databases)
                 ) &&
                 (
                     Ts == other.Ts ||
                     Ts != null &&
                     Ts.Equals(other.Ts)
                 ) &&
                 (
                     Self == other.Self ||
                     Self != null &&
                     Self.Equals(other.Self)
                 ) &&
                 (
                     Etag == other.Etag ||
                     Etag != null &&
                     Etag.Equals(other.Etag)
                 ) &&
                 (
                     Colls == other.Colls ||
                     Colls != null &&
                     Colls.Equals(other.Colls)
                 ) &&
                 (
                     Users == other.Users ||
                     Users != null &&
                     Users.Equals(other.Users)
                 ));
        }
Beispiel #30
0
        /// <summary>
        ///     Returns true if Trigger instances are equal
        /// </summary>
        /// <param name="other">Instance of Trigger to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Trigger other)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            if (other == null)
            {
                return(false);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Body == other.Body ||
                     Body != null &&
                     Body.Equals(other.Body)
                 ) &&
                 (
                     TriggerOperation == other.TriggerOperation ||
                     TriggerOperation != null &&
                     TriggerOperation.Equals(other.TriggerOperation)
                 ) &&
                 (
                     TriggerType == other.TriggerType ||
                     TriggerType != null &&
                     TriggerType.Equals(other.TriggerType)
                 ) &&
                 (
                     Rid == other.Rid ||
                     Rid != null &&
                     Rid.Equals(other.Rid)
                 ) &&
                 (
                     Ts == other.Ts ||
                     Ts != null &&
                     Ts.Equals(other.Ts)
                 ) &&
                 (
                     Self == other.Self ||
                     Self != null &&
                     Self.Equals(other.Self)
                 ) &&
                 (
                     Etag == other.Etag ||
                     Etag != null &&
                     Etag.Equals(other.Etag)
                 ));
        }
Beispiel #31
0
        public TestOrderRecord()
        {
            log.Debug("TestOrderRecord:ctor");

            _type = (string)RecordId.TestOrderRecord;
            _sequence = 0;
            _sample_id = String.Empty;
            _instrument = new Cm();
            _test = new Cm();
            _priority = String.Empty;
            _created_at = String.Empty;
            _sampled_at = new DateTime();
            _collected_at = String.Empty;
            _volume = String.Empty;
            _collector = String.Empty;
            _action_code = String.Empty;
            _danger_code = String.Empty;
            _clinical_info = String.Empty;
            _delivered_at = String.Empty;
            _biomaterial = 0;
            _physician = String.Empty;
            _physician_phone = String.Empty;
            _user_field_1 = String.Empty;
            _user_field_2 = String.Empty;
            _laboratory_field_1 = String.Empty;
            _laboratory_field_2 = String.Empty;
            _modified_at = new DateTime();
            _instrument_charge = String.Empty;
            _instrument_section = String.Empty;
            _report_type = String.Empty;
            _reserved = String.Empty;
            _location_ward = String.Empty;
            _infection_flag = String.Empty;
            _specimen_service = String.Empty;
            _laboratory = String.Empty;

            InitializeCm("Instrument", this.GetType(), _instrument);
            //InitializeCm("Test", this.GetType(), _test);

            InitializememberList();
        }