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

C# System.Contract类代码示例

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

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



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

示例1: WriteAssignments

 private void WriteAssignments(Contract contract, IndentedTextWriter writer)
 {
     foreach (Member member in contract.Members)
     {
         writer.WriteLine("{0} = {1};", member.Name, GeneratorUtil.ParameterCase(member.Name));
     }
 }
开发者ID:alreva,项目名称:CQRS_Example,代码行数:7,代码来源:MessagesGenerator.cs


示例2: EditContract

        public static bool EditContract(Contract Ct)
        {
            try
            {
                db = new UcasProEntities();
                db.Configuration.LazyLoadingEnabled = false;
                db.Configuration.ProxyCreationEnabled = false;
                var q = db.Contracts.Where(p => p.ID == Ct.ID).SingleOrDefault();
                q.Employee_ID = Ct.Employee_ID;
                q.TotalSalary = Ct.TotalSalary;
                q.SelaryAmount = Ct.SelaryAmount;
                q.StartDate = Ct.StartDate;
                q.EndDate = Ct.EndDate;
                q.Status = Ct.Status;
                
                db.SaveChanges();
                return true;

            }
            catch (Exception ex)
            {


                Xprema.XpremaException e = new Xprema.XpremaException();
                e.CodeNumber = 6;
                e.OtherDescription = ex.InnerException.InnerException.Message;
                e.UserDescription = "Error in Save Changed";
                e.UserDescriptionArabic = "خطاء في حفظ البيانات";
                throw e;
            }
        }
开发者ID:ainma007,项目名称:UcasProject,代码行数:31,代码来源:ContractCmd.cs


示例3: ExecuteClientSearch

        public Contract.Search.SearchResultCollection ExecuteClientSearch(Contract.Search.Search search)
        {
            YellowstonePathology.YpiConnect.Service.SearchGateway gateway = new YellowstonePathology.YpiConnect.Service.SearchGateway();
            YellowstonePathology.YpiConnect.Contract.Search.SearchResultCollection searchResults = null;

            switch (search.SearchType)
            {
                case YellowstonePathology.YpiConnect.Contract.Search.SearchTypeEnum.PatientLastNameSearch:
                    searchResults = gateway.GetClientCasesByPatientLastName(search);
                    break;
                case YellowstonePathology.YpiConnect.Contract.Search.SearchTypeEnum.PatientLastAndFirstNameSearch:
                    searchResults = gateway.GetClientCasesByPatientLastNameAndFirstName(search);
                    break;
                case YellowstonePathology.YpiConnect.Contract.Search.SearchTypeEnum.RecentCases:
                    searchResults = gateway.GetClientRecentCases(search);
                    break;
                case YellowstonePathology.YpiConnect.Contract.Search.SearchTypeEnum.NotDownloaded: //Not Downloaded is Depricated SH 5/17/2010
                case YellowstonePathology.YpiConnect.Contract.Search.SearchTypeEnum.NotAcknowledged:
                    searchResults = gateway.GetClientCasesNotAcknowledged(search);
                    break;
                case YellowstonePathology.YpiConnect.Contract.Search.SearchTypeEnum.DateOfBirth:
                    searchResults = gateway.GetClientCasesByPBirthDate(search);
                    break;
                case YellowstonePathology.YpiConnect.Contract.Search.SearchTypeEnum.SocialSecurityNumber:
                    searchResults = gateway.GetClientCasesByPSSN(search);
                    break;
            }

            if (searchResults == null) searchResults = new Contract.Search.SearchResultCollection();
            return searchResults;
        }
开发者ID:WilliamCopland,项目名称:YPILIS,代码行数:31,代码来源:SearchService.cs


示例4: Initialize

 public override void Initialize(BacktestServerProxy.RobotContext grobotContext, 
     Contract.Util.BL.CurrentProtectedContext protectedContextx)
 {
     base.Initialize(grobotContext, protectedContextx);
     packers = Graphics.ToDictionary(g => g.a, g => new CandlePacker(g.b));
     digitsDen = (int) Math.Pow(10, roundDigits);
 }
开发者ID:johnmensen,项目名称:TradeSharp,代码行数:7,代码来源:RoundPriceRobot.cs


示例5: InsertTest

 public void InsertTest(Contract.CTestManager manager)
 {
     using (TestManagerDBContainer container = new TestManagerDBContainer())
     {
         int result = container.InsertTestManager(manager.Name, manager.Description, manager.NumberOfQuestions, manager.NumberOfQuestions, manager.TotalMarks, manager.GradeID, manager.Duration, manager.PassingMarks);
     }
 }
开发者ID:EdiCarlos,项目名称:MyPractices,代码行数:7,代码来源:TestManagerService.cs


示例6: NewContract

        public static bool NewContract(Contract Ct)
        {
            try
            {
                db = new UcasProEntities();
                db.Configuration.ProxyCreationEnabled = false;
                db.Configuration.LazyLoadingEnabled = false;
                db.Contracts.Add(Ct);
                db.SaveChanges();
                return true;

            }
            catch (Exception ex)
            {
               
                Xprema.XpremaException e = new Xprema.XpremaException();
                e.CodeNumber = 6;
                e.OtherDescription = ex.InnerException.InnerException.Message;
                File.WriteAllText("t.txt", ex.InnerException.InnerException.Message);
                e.UserDescription = "Error in Save Changed";
                if (ex.InnerException.InnerException.Message.Contains("Violation of PRIMARY KEY constraint 'PK_Contracts'. Cannot insert duplicate key in object 'dbo.Contracts'"))
                {
                    e.UserDescriptionArabic = "الموظف موجود عقده في المشروع مسبقا";

                }
                else
                    e.UserDescriptionArabic = e.OtherDescription;//"خطاء في اضافة البيانات";
               
                 throw e;
            }
        }
开发者ID:ainma007,项目名称:UcasProject,代码行数:31,代码来源:ContractCmd.cs


示例7: ExecutePathologistSearch

        public Contract.Search.SearchResultCollection ExecutePathologistSearch(Contract.Search.Search search)
        {
            YellowstonePathology.YpiConnect.Service.SearchGateway gateway = new YellowstonePathology.YpiConnect.Service.SearchGateway();
            YellowstonePathology.YpiConnect.Contract.Search.SearchResultCollection searchResults = null;

            switch (search.SearchType)
            {
                case YellowstonePathology.YpiConnect.Contract.Search.SearchTypeEnum.PatientLastNameSearch:
                    searchResults = gateway.GetPathologistCasesByPatientLastName(search);
                    break;
                case YellowstonePathology.YpiConnect.Contract.Search.SearchTypeEnum.PatientLastAndFirstNameSearch:
                    searchResults = gateway.GetPathologistCasesByPatientLastNameAndFirstName(search);
                    break;
                case YellowstonePathology.YpiConnect.Contract.Search.SearchTypeEnum.RecentCases:
                    searchResults = gateway.GetPathologistRecentCases(search);
                    break;
                case YellowstonePathology.YpiConnect.Contract.Search.SearchTypeEnum.DateOfBirth:
                    searchResults = gateway.GetPathologistCasesByPBirthDate(search);
                    break;
                case YellowstonePathology.YpiConnect.Contract.Search.SearchTypeEnum.SocialSecurityNumber:
                    searchResults = gateway.GetPathologistCasesByPSSN(search);
                    break;
                case YellowstonePathology.YpiConnect.Contract.Search.SearchTypeEnum.RecentCasesForFacilityId:
                    searchResults = gateway.GetRecentProfessionalCasesByFacilityId(search);
                    break;
            }

            if (searchResults == null) searchResults = new Contract.Search.SearchResultCollection();
            return searchResults;
        }
开发者ID:WilliamCopland,项目名称:YPILIS,代码行数:30,代码来源:SearchService.cs


示例8: ReadGraph

 /// <summary>
 /// Constructor for the <c>ReadGraph</c> object. This is used
 /// to create graphs that are used for reading objects from the XML
 /// document. The specified strategy is used to acquire the names
 /// of the special attributes used during the serialization.
 /// </summary>
 /// <param name="contract">
 /// this is the name scheme used by the strategy
 /// </param>
 /// <param name="loader">
 /// this is the class loader to used for the graph
 /// </param>
 public ReadGraph(Contract contract, Loader loader) {
    this.refer = contract.getReference();
    this.mark = contract.getIdentity();
    this.length = contract.getLength();
    this.label = contract.getLabel();
    this.loader = loader;
 }
开发者ID:ngallagher,项目名称:simplexml,代码行数:19,代码来源:ReadGraph.cs


示例9: ProvisionSiteCollection

        public bool ProvisionSiteCollection(Contract.SharePointProvisioningData sharePointProvisioningData)
        {
            bool processed = false;
            try
            {
                SiteProvisioningBase siteToProvision = null;
                switch (sharePointProvisioningData.Template)
                {
                    case SiteProvisioningTypes.ContosoCollaboration:
                        siteToProvision = new ContosoCollaboration();
                        break;
                    case SiteProvisioningTypes.ContosoProject:
                        siteToProvision = new ContosoProject();
                        break;
                }

                siteToProvision.SharePointProvisioningData = sharePointProvisioningData;
                HookupAuthentication(siteToProvision);

                // Hookup class that will hold the on-prem overrides
                SiteProvisioningOnPremises spo = new SiteProvisioningOnPremises();
                siteToProvision.SiteProvisioningOnPremises = spo;

                // Provision the site collection
                processed = siteToProvision.Execute();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                //log error
            }

            return processed;
        }
开发者ID:Calisto1980,项目名称:PnP,代码行数:34,代码来源:SharePointProvisioning.cs


示例10: btnNewContract_Click_1

 private void btnNewContract_Click_1(object sender, RoutedEventArgs e)
 {
     Contract nContract = new Contract();
     nContract.CompanyId = company.Id;
     saveUpdateContract(nContract);
     loadContracts();
 }
开发者ID:Exomnius,项目名称:TogetherIsBetter,代码行数:7,代码来源:SettingsFrm.xaml.cs


示例11: CreateContract

        public async Task CreateContract(CreateContractInputDto input)
        {
            //We can use Logger, it's defined in ApplicationService class.
            Logger.Info("Creating an contract for input: " + input);

            //Creating a new Task entity with given input's properties
            var contract = new Contract
            {
                Start = input.Start,
                State = ContractState.Active,
                Type = input.Type,
                BaseHourQtyPerMonth = input.BaseHourQtyPerMonth,
                BaseHourRatePerMonth = input.BaseHourRatePerMonth
                

            };
            if (input.Finish.HasValue) { contract.Finish = input.Finish; }

            
            contract.AccountId = input.AccountId;
            contract.Account = _accountRepository.Load((long)input.AccountId);
           

            //Saving entity with standard Insert method of repositories.
            await _contractRepository.InsertAsync(contract);
        }
开发者ID:jonquickqsense,项目名称:projectkorai,代码行数:26,代码来源:ContractAppService.cs


示例12: PutContract

        public async Task<IHttpActionResult> PutContract(int id, Contract contract)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != contract.Id)
            {
                return BadRequest();
            }
            using (var transaction = db.Database.BeginTransaction())
            {
                var origin = db.Contracts.Find(contract.Id);
                db.Entry<Contract>(origin).Collection(c => c.AppartmentOwners).Load();

                db.Changes.AddRange(Helper.Logger.ChangeRecords<Contract>(origin, contract, RequestContext.Principal.Identity.Name));
                var added = contract.AppartmentOwners.Except(origin.AppartmentOwners.ToList(), new AppartmentOwnerComparator());
                var deleted = origin.AppartmentOwners.ToList().Except(contract.AppartmentOwners, new AppartmentOwnerComparator());
                db.AppartmentOwners.RemoveRange(deleted);
                foreach (var ao in added)
                {
                    ao.ContractId = contract.Id;
                    db.AppartmentOwners.Add(ao);
                }
                db.Entry<Contract>(origin).State = EntityState.Detached;
                await db.SaveChangesAsync();
                foreach (var ao in contract.AppartmentOwners)
                {
                    var aoindb = db.AppartmentOwners.Find(ao.Id);
                    aoindb.ShowAsOwner = ao.ShowAsOwner;
                    aoindb.ShowOnCert = ao.ShowOnCert;
                    db.Entry<AppartmentOwner>(aoindb).State = EntityState.Modified;
                }
               
                contract.AppartmentOwners = null;
                db.Entry<Contract>(contract).State = EntityState.Modified;
               
                try
                {
                    await db.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ContractExists(id))
                    {
                        return NotFound();
                    }
                    else
                    {
                        throw;
                    }
                }
                transaction.Commit();
            }

            return StatusCode(HttpStatusCode.NoContent);
        }
开发者ID:luffy-xiao,项目名称:HTMS,代码行数:58,代码来源:ContractsController.cs


示例13: ContractView

        public ContractView(Contract contract)
        {
            InitializeComponent();

            _activeContract = contract;
            _repository = new DataRepository();

            PopulateFields(contract);
            InitializeHandlers();
        }
开发者ID:reecebedding,项目名称:EVE_LogisticiansTool,代码行数:10,代码来源:ContractView.cs


示例14: PutUserProfile

        public int PutUserProfile(Contract.DataContract.User user)
        {
            Guid userId = ((NotenetIdentity)HttpContext.Current.User.Identity).UID;
            if (userId != user.userID)
            {
                return -1;//will not be stopped at exception
            }

            return (int)db.PutUserInfo(user.userID, user.Birthday, user.NickName, user.RealName, user.Email).FirstOrDefault();
        }
开发者ID:sirtristancomtedeartois,项目名称:note,代码行数:10,代码来源:User.svc.cs


示例15: DevContract

        public DevContract(winStatusEnum status, Contract con = null)
        {
            InitializeComponent();
            if (con != null)
                m_contract = con;
            else
                m_contract = new Contract();

            SetFormStatus(status);
        }
开发者ID:hmxiaoxiao,项目名称:haimenlg,代码行数:10,代码来源:DevContract.cs


示例16: Edit

 public ActionResult Edit(Contract contract)
 {
     if (ModelState.IsValid)
     {
         db.Entry(contract).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(contract);
 }
开发者ID:chutinhha,项目名称:my-asset-management,代码行数:10,代码来源:ContractController.cs


示例17: Check

 public void Check(Contract contract)
 {
     for (int i = 0; i < ScriptHashes.Length; i++)
     {
         if (ScriptHashes[i] == contract.ScriptHash)
         {
             completed[i] = contract.IsCompleted(signatures[i].Keys.ToArray());
             break;
         }
     }
 }
开发者ID:zhengger,项目名称:AntShares,代码行数:11,代码来源:SignatureContext.cs


示例18: PopulateFields

 private void PopulateFields(Contract contract)
 {
     //Populate all the onscreen controls with the relevant information of the contract
     lblLocation.Text = contract.StartSystem.SolarSystemDisplayName;
     lblDestination.Text = contract.EndSystem.SolarSystemDisplayName;
     lblStatus.Text = contract.Status;
     lblVolume.Text = contract.Volume.ToString("N") + " m3";
     lblExpires.Text = contract.Expiration.ToString();
     lblReward.Text = contract.Reward.ToString("N") + " ISK";
     lblCollateral.Text = contract.Collateral.ToString("N") + " ISK";
 }
开发者ID:reecebedding,项目名称:EVE_LogisticiansTool,代码行数:11,代码来源:ContractView.cs


示例19: Create

        public ActionResult Create(Contract contract)
        {
            if (ModelState.IsValid)
            {
                db.Contracts.Add(contract);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(contract);
        }
开发者ID:chutinhha,项目名称:my-asset-management,代码行数:11,代码来源:ContractController.cs


示例20: QuoteSubscription

        public QuoteSubscription(IConnection connection, IIdsDispenser dispenser, IQuoteObserver observer, Contract contract)
        {
            CodeContract.Requires(connection != null);
            CodeContract.Requires(observer != null);
            CodeContract.Requires(dispenser != null);

            this.connection = connection;
            this.observer = observer;

            this.Subscribe(contract, dispenser);
        }
开发者ID:qadmium,项目名称:ibapi,代码行数:11,代码来源:QuoteSubscription.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# System.Coord类代码示例发布时间:2022-05-26
下一篇:
C# System.ConsoleOptions类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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