• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Contract类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Contract的典型用法代码示例。如果您正苦于以下问题:C# Contract类的具体用法?C# Contract怎么用?C# Contract使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Contract类属于命名空间,在下文中一共展示了Contract类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Generate

        public override ContractParameter Generate(Contract contract)
        {
            // Get the OrbitGenerator behaviour
            OrbitGenerator orbitGenerator = ((ConfiguredContract)contract).Behaviours.OfType<OrbitGenerator>().FirstOrDefault<OrbitGenerator>();

            if (orbitGenerator == null)
            {
                LoggingUtil.LogError(this, "Could not find OrbitGenerator BEHAVIOUR to couple with ReachSpecificOrbit PARAMETER.");
                return null;
            }

            // Get the parameter for that orbit
            try
            {
                SpecificOrbitWrapper s = orbitGenerator.GetOrbitParameter(index);
                if (deviationWindow != 0.0)
                {
                    s.deviationWindow = deviationWindow;
                }
                return new VesselParameterDelegator(s);
            }
            catch (Exception e)
            {
                LoggingUtil.LogError(this, "Couldn't find orbit in OrbitGenerator with index " + index + ": " + e.Message);
                return null;
            }
        }
开发者ID:linuxgurugamer,项目名称:ContractConfigurator,代码行数:27,代码来源:ReachSpecificOrbitFactory.cs


示例2: ExecDetailsEventArgs

 /// <summary>
 /// Full Constructor
 /// </summary>
 /// <param name="requestId">The request Id for the Execution Details.</param>
 /// <param name="orderId">The order Id that was specified previously in the call to placeOrder().</param>
 /// <param name="contract">This structure contains a full description of the contract that was executed.</param>
 /// <param name="execution">This structure contains addition order execution details.</param>
 public ExecDetailsEventArgs(int requestId, int orderId, Contract contract, Execution execution)
 {
     this.requestId = requestId;
     this.orderId = orderId;
     this.execution = execution;
     this.contract = contract;
 }
开发者ID:yixin-xie,项目名称:ib-csharp,代码行数:14,代码来源:ExecDetailsEventArgs.cs


示例3: CreateContract

 public ActionResult CreateContract(Contract contract)
 {
     contract.Id = Guid.NewGuid();
     Context.Contracts.Add(contract);
     Context.SaveChanges();
     return View();
 }
开发者ID:johannesait,项目名称:webshop,代码行数:7,代码来源:CustomerController.cs


示例4: ContractDetailsDialog

 public ContractDetailsDialog(Contract contract)
 {
     InitializeComponent();
     textBox1.Text = Wallet.ToAddress(contract.ScriptHash);
     textBox2.Text = contract.ScriptHash.ToString();
     textBox3.Text = contract.RedeemScript.ToHexString();
 }
开发者ID:zhengger,项目名称:AntShares,代码行数:7,代码来源:ContractDetailsDialog.cs


示例5: ExecutionMessage

 public ExecutionMessage(int reqId, Contract contract, Execution execution)
 {
     Type = MessageType.ExecutionData;
     ReqId = reqId;
     Contract = contract;
     Execution = execution;
 }
开发者ID:conradakunga,项目名称:QuantTrading,代码行数:7,代码来源:ExecutionMessage.cs


示例6: OpenOrderEventArgs

 ///<summary>
 /// Parameterless OpenOrderEventArgs Constructor
 ///</summary>
 public OpenOrderEventArgs()
 {
     this.orderId = -1;
     this.order = new Order();
     this.contract = new Contract();
     this.orderState = new OrderState();
 }
开发者ID:yixin-xie,项目名称:ib-csharp,代码行数:10,代码来源:OpenOrderEventArgs.cs


示例7: addUser

        private String addUser()
        {
            try
            {
                Contract contract = new Contract();
                String cxnString = "Driver={SQL Server};Server=HC-sql7;Database=REVINT;Trusted_Connection=yes;";
                using (OdbcConnection dbConnection = new OdbcConnection(cxnString))
                {
                    //open OdbcConnection object
                    dbConnection.Open();

                    OdbcCommand cmd = new OdbcCommand();

                    cmd.CommandText = "{CALL [REVINT]." + contract.getSchema() + ".[OCP_addUser]( ?, ?, ?, ? )}";
                    cmd.CommandType = System.Data.CommandType.StoredProcedure;
                    cmd.Connection = dbConnection;

                    cmd.Parameters.Add("@hawkId", OdbcType.NVarChar, 400).Value = txtHealthcareID.Text;
                    cmd.Parameters.Add("@administrator", OdbcType.Bit).Value = chkAdmin.IsChecked;
                    cmd.Parameters.Add("@name", OdbcType.NVarChar, 400).Value = txtName.Text;
                    cmd.Parameters.Add("@numRecords", OdbcType.Int);
                    cmd.Parameters["@numRecords"].Direction = System.Data.ParameterDirection.ReturnValue;

                    cmd.ExecuteNonQuery();

                    dbConnection.Close();

                    return cmd.Parameters["@numRecords"].Value.ToString();
                }
            }
            catch (Exception)
            {
                return null;
            }
        }
开发者ID:ep2012,项目名称:OCP-2.0,代码行数:35,代码来源:AddUser.xaml.cs


示例8: fromDomain

        public ContractListItemModel fromDomain(Contract contract)
        {
            this.value = contract.ContractId.ToString();
            this.description = contract.Description;

            return this;
        }
开发者ID:mvillaronga-medkoder,项目名称:reactjs,代码行数:7,代码来源:ContractListItemModel.cs


示例9: GetRandomContract

    public static Contract GetRandomContract(int Tier)
    {
        Contract contract = new Contract();

        //Get Contract element Tier lists
        int indexedTier = Tier - 1;

        List<ContractContent> contents = ContractManager.Contents[indexedTier];
        List<ContractTargetName> targetNames = ContractManager.TargetNames[indexedTier];
        List<ContractTargetImage> targetImages = ContractManager.TargetImages[indexedTier];
        List<ContractTargetShipImage> targetShipImages = ContractManager.TargetShipImages[indexedTier];

        ContractContent content = new ContractContent();
        ContractTargetName targetName = new ContractTargetName();
        ContractTargetImage targetImage = new ContractTargetImage();
        ContractTargetShipImage targetShipImage = new ContractTargetShipImage();

        //Get random content
        if (contents != null)
            content = contents[Random.Range(0, contents.Count)];

        if (targetNames != null)
            targetName = targetNames[Random.Range(0, targetNames.Count)];

        if (targetImages != null)
            targetImage = targetImages[Random.Range(0, targetImages.Count)];

        if (targetShipImages != null)
            targetShipImage = targetShipImages[Random.Range(0, targetShipImages.Count)];

        //Build contract
        contract = new Contract(targetName.TargetName, content.Description, content.Title, targetImage.TargetImagePath, targetShipImage.TargetShipImagePath, content.Objectives);

        return contract;
    }
开发者ID:SpaceSpaceSpace,项目名称:Space,代码行数:35,代码来源:ContractUtils.cs


示例10: getContractTxt

        public static string getContractTxt(Contract con)
        {
            string content = "\r\n 合同详细信息:\r\n\r\n";

            content += "协议类型:" + con.proCate + "\r\n";
            content += "协议名称:" + con.proName + "\r\n";
            content += "协议编号:" + con.proId + "\r\n";
            content += "联通公司业务联系人:" + con.unicomLinkMan + "\r\n";
            content += "联系电话:" + con.linkPhone + "\r\n";
            content += "集团客户客户经理:" + con.groupCusManager + "\r\n";
            content += "协议签署单位名称:" + con.proSignUnitName + "\r\n";
            content += "单位地址:" + con.unitAdd + "\r\n";
            content += "协议签署:" + con.proSign + "\r\n";
            content += "签署单位联系人:" + con.signUnitLinkMan + "\r\n";
            content += "联系电话:" + con.signUnitLinkPhone + "\r\n";
            content += "付费号码:" + con.payPhone + "\r\n";
            content += "收费标准:" + con.payStand + "\r\n";
            content += "协议签订日期:" + con.proSignDate + "\r\n";
            content += "协议执行日期:" + con.proSignExeDate + "\r\n";
            content += "协议期限:" + con.proDeadLine + "\r\n";
            content += "协议到期日期:" + con.proExpireData + "\r\n";
            content += "协议内容简述:" + con.proDesc + "\r\n";
            content += "备注:" + con.remark + "\r\n";
            content += "电路调单号:" + con.dltdh + "\r\n";
            content += "文件名:" + con.fileName + "\r\n";

            return content;
        }
开发者ID:holenzh,项目名称:CSharpProjAtYC,代码行数:28,代码来源:TxtForm.cs


示例11: Generate

 public override ContractParameter Generate(Contract contract)
 {
     ReachState param = new ReachState(targetBodies, biome == null ? "" : biome.biome, situation, minAltitude, maxAltitude,
         minTerrainAltitude, maxTerrainAltitude, minSpeed, maxSpeed, minRateOfClimb, maxRateOfClimb, minAcceleration, maxAcceleration, title);
     param.FailWhenUnmet = failWhenUnmet;
     return param;
 }
开发者ID:Kerbas-ad-astra,项目名称:ContractConfigurator,代码行数:7,代码来源:ReachStateFactory.cs


示例12: Delete

 /// <summary>
 /// Delete the specified contract.
 /// </summary>
 /// <param name="contract">The contract to be deleted.</param>
 /// <returns>Number of affected rows.</returns>
 public static int Delete(Contract contract)
 {
     using (SqlConnection connection = SamenSterkerDB.GetConnection())
     {
         return connection.Execute(sql: deleteQuery, param: contract);
     }
 }
开发者ID:pjfoi,项目名称:projectNet,代码行数:12,代码来源:ContractDB.cs


示例13: MockContract_GetAll_GotData

        public void MockContract_GetAll_GotData()
        {
            Contract c1 = new Contract()
            {
                Id = 1,
                FirstName = "Иван",
                LastName = "Петров",
                MiddleName = "Вениаминович",
                Snils = "111-222-333 01"
            };

            Contract c2 = new Contract()
            {
                Id = 2,
                FirstName = "Иван",
                LastName = "Сидоров",
                MiddleName = "Вениаминович",
                Snils = "111-222-333 01"
            };
            List<Contract> contracts = new List<Contract> { c1, c2 };
            //int total = _rep.GetAll().Count;
            var mockCustomer = new Mock<Contract>();
            var mockRep = new Mock<IContractRepository>();
            mockRep.Setup(x => x.GetAll()).Returns(contracts);
              
            var tmp = mockRep.Object.GetAll();

            Assert.IsTrue(tmp.Count > 0);
            //.IsTrue(1 > 0);
        }
开发者ID:ninthrampart,项目名称:Learn_TDD,代码行数:30,代码来源:UnitTest1.cs


示例14: CreateCallListWithTwoCalls

 public static IList<Call> CreateCallListWithTwoCalls(Contract contract)
 {
     return new List<Call>
                      {
                          new Call(1)
                             {
                                 CalledFrom = "SATELLITE",
                                 ContractId = contract.Id.Value,
                                 Volume = 2.54M,
                                 HasFreeCallTariff = true,
                                 ImportedCallType = "TEST CALL",
                                 NumberCalled = "0400000001",
                                 PhoneNumber = contract.PhoneNumber1,
                                 UnitCost = 1M,
                                 UnitsOfTime = 6,
                                 Cost = 6.5M
                             },
                         new Call(2)
                             {
                                 CalledFrom = "SATELLITE",
                                 ContractId = contract.Id.Value,
                                 Volume = 5.23M,
                                 HasFreeCallTariff = true,
                                 ImportedCallType = "TEST CALL",
                                 NumberCalled = "0400000002",
                                 PhoneNumber = contract.PhoneNumber1,
                                 UnitCost = 1M,
                                 UnitsOfTime = 11,
                                 Cost = 11.5M
                             }
                      };
 }
开发者ID:robgray,项目名称:Tucana,代码行数:32,代码来源:FakesHelper.cs


示例15: AskForBid

        public BidType AskForBid(Contract currentContract, IList<BidType> allowedBids, IList<BidType> previousBids)
        {
            this.Contract = currentContract;
            while (true)
            {
                this.Draw();

                var availableBidsAsString = AvailableBidsAsString(allowedBids);

                ConsoleHelper.WriteOnPosition(availableBidsAsString, 0, Settings.ConsoleHeight - 2);
                ConsoleHelper.WriteOnPosition("It's your turn! Please enter your bid: ", 0, Settings.ConsoleHeight - 3);

                BidType bid;

                var playerContract = Console.ReadLine();
                if (string.IsNullOrWhiteSpace(playerContract))
                {
                    continue;
                }

                playerContract = playerContract.Trim();
                switch (char.ToUpper(playerContract[0]))
                {
                    case 'A':
                        bid = BidType.AllTrumps;
                        break;
                    case 'N':
                        bid = BidType.NoTrumps;
                        break;
                    case 'S':
                        bid = BidType.Spades;
                        break;
                    case 'H':
                        bid = BidType.Hearts;
                        break;
                    case 'D':
                        bid = BidType.Diamonds;
                        break;
                    case 'C':
                        bid = BidType.Clubs;
                        break;
                    case 'P':
                        bid = BidType.Pass;
                        break;
                    case '2':
                        bid = BidType.Double;
                        break;
                    case '4':
                        bid = BidType.ReDouble;
                        break;
                    default:
                        continue;
                }

                if (allowedBids.Contains(bid))
                {
                    return bid;
                }
            }
        }
开发者ID:razsilev,项目名称:TelerikAcademy_Homework,代码行数:60,代码来源:ConsoleHumanPlayer.cs


示例16: OpenOrderEventArgs

 /// <summary>
 /// Initializes a new instance of the <see cref="OpenOrderEventArgs"/> class
 /// </summary>
 public OpenOrderEventArgs(int orderId, Contract contract, Order order, OrderState orderState)
 {
     OrderId = orderId;
     Contract = contract;
     Order = order;
     OrderState = orderState;
 }
开发者ID:AlexCatarino,项目名称:Lean,代码行数:10,代码来源:OpenOrderEventArgs.cs


示例17: Add

        public int Add(string hitmanId, string clientId, DateTime deadline, string targetName = null, string location = null)
        {
            var hitmanFromDb = this.users
                .All()
                .Where(x => x.Id == hitmanId)
                .FirstOrDefault();
            var client = this.users
                .All()
                .Where(x => x.Id == clientId)
                .FirstOrDefault();
            if (hitmanFromDb == null)
            {
                throw new ArgumentException("Invalid hitman!");
            }
            else if (client == null)
            {
                throw new ArgumentException("Invalid client!");
            }

            var contract = new Contract();
            contract.Client = client;
            contract.Hitman = hitmanFromDb;
            contract.Deadline = deadline;
            contract.TargetName = targetName;
            contract.Location = location;

            this.contracts.Add(contract);
            return this.contracts.SaveChanges();
        }
开发者ID:ERIS-Team-TelerikAcademy,项目名称:ERIS-App,代码行数:29,代码来源:ContractsService.cs


示例18: Creer_un_contrat

        public async Task Creer_un_contrat()
        {
            Creer_un_client();
            var repo = IoC.Resolve<IAsyncRepositoryWithLogicalDeletion<Client>>();
            var result = await repo.FindBy(x => x.Id == 1);
            if (!result.Any())
            {
                Assert.Fail("Impossible de poursuire le test : client introuvalble");
                return;
            }

            var client = result.FirstOrDefault();
            client.Name = "sexodrome4";
            var contrat = new Contract();

            contrat.Comment = "super commentaire";
            contrat.EffectiveOn = DateTime.Now.Date.AddMonths(1);
            contrat.EffectiveUntil = DateTime.Now.Date.AddYears(5);
            contrat.Type = new ContractType { Label = "Fucking Contract!" };
            if (contrat.Documents == null) contrat.Documents = new Collection<Document>();
            contrat.Documents.Add(new Document { Name = "le putain de contrat man" });

            // TODO : revoir les notions de contractants et de co-contractants.

            if (client.Contracts == null) client.Contracts = new Collection<Contract>();
            client.Contracts.Add(contrat);
           
            await repo.Save();


        }
开发者ID:fredthevenon,项目名称:DemeterStudio,代码行数:31,代码来源:UnitTest1.cs


示例19: ContractList

        public ActionResult ContractList( string seq, string contractnum, string projectnum,
            string projectname, string rfid, string contractplace,
            string bcompany, string money, string pvalue, string pkey = "seq", int pageidx = 1, int pagesize = 20)
        {

            Contract query = new Contract();
            query.seq = seq;
            query.contractnum = contractnum;
            query.projectnum = projectnum;
            query.projectname = projectname;
            query.contractrfid = rfid;
            query.contractplace = contractplace;
            query.bcompany = bcompany;
            query.money = money;

            //
            query.pkey = pkey;
            query.pvalue = pvalue;

            Page<Contract> page = GetData(query, pageidx, pagesize);

            

            return View(page);  
        }
开发者ID:jxdong1013,项目名称:archivems,代码行数:25,代码来源:ContractController.cs


示例20: OnContractAccepted

 protected void OnContractAccepted(Contract c)
 {
     if (c == Root)
     {
         launchID = HighLogic.CurrentGame.launchID;
     }
 }
开发者ID:ToneStack87,项目名称:ContractConfigurator,代码行数:7,代码来源:NewVessel.cs



注:本文中的Contract类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ContractFailureKind类代码示例发布时间:2022-05-24
下一篇:
C# Contour类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap