当前位置: 首页>>代码示例>>C#>>正文


C# Contract.Run方法代码示例

本文整理汇总了C#中Contract.Run方法的典型用法代码示例。如果您正苦于以下问题:C# Contract.Run方法的具体用法?C# Contract.Run怎么用?C# Contract.Run使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Contract的用法示例。


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

示例1: OnContractsOpenContract

        protected virtual void OnContractsOpenContract(object o, EventArgs args)
        {
            int itemid;
            TreeIter iter;

            treeviewContracts.Selection.GetSelected(out iter);
            itemid = (int) ContractsListStore.GetValue(iter,0);
            Contract winContract = new Contract();
            winContract.ContractFill(itemid);
            winContract.Show();
            winContract.Run();
            winContract.Destroy();
            UpdateContracts ();
        }
开发者ID:QualitySolution,项目名称:Bazar,代码行数:14,代码来源:Lessee.cs

示例2: OnButtonViewClicked

    protected virtual void OnButtonViewClicked(object sender, System.EventArgs e)
    {
        TreeIter iter;
        int type, itemid;
        string place;
        ResponseType result;

        switch (notebookMain.CurrentPage) {
        case 0:
            treeviewPlaces.Selection.GetSelected (out iter);
            place = PlaceSort.GetValue (iter, (int)PlaceCol.place_no).ToString ();
            type = Convert.ToInt32 (PlaceSort.GetValue (iter, (int)PlaceCol.type_place_id));
            Place winPlace = new Place (false);
            winPlace.PlaceFill (type, place);
            winPlace.Show ();
            result = (ResponseType)winPlace.Run ();
            winPlace.Destroy ();
            if (result == ResponseType.Ok)
                UpdatePlaces ();
            break;
        case 1:
            treeviewLessees.Selection.GetSelected (out iter);
            itemid = Convert.ToInt32 (LesseesSort.GetValue (iter, (int)LesseesCol.id));
            lessee winLessee = new lessee ();
            winLessee.LesseeFill (itemid);
            winLessee.Show ();
            result = (ResponseType)winLessee.Run ();
            winLessee.Destroy ();
            if (result == ResponseType.Ok)
                UpdateLessees ();
            break;
        case 2:
            treeviewContract.Selection.GetSelected (out iter);
            itemid = (int)ContractSort.GetValue (iter, (int)ContractCol.id);
            Contract winContract = new Contract ();
            winContract.ContractFill (itemid);
            winContract.Show ();
            result = (ResponseType)winContract.Run ();
            winContract.Destroy ();
            if (result == ResponseType.Ok)
                UpdateContract ();
            break;
        case 3:
            itemid = Convert.ToInt32 (treeviewAccrual.GetSelectedObject<AccrualListEntryDTO>().Id);
            Accrual winAccrual = new Accrual ();
            winAccrual.AccrualFill (itemid);
            winAccrual.Show ();
            result = (ResponseType)winAccrual.Run ();
            winAccrual.Destroy ();
            if (result == ResponseType.Ok)
                UpdateAccrual ();
            break;
        case 4:
            switch (notebookCash.CurrentPage) {
            case 0:
                treeviewIncome.Selection.GetSelected (out iter);
                itemid = Convert.ToInt32 (CashIncomeSort.GetValue (iter, (int)CashIncomeCol.id));
                IncomeSlip winIncome = new IncomeSlip ();
                winIncome.SlipFill (itemid, false);
                winIncome.Show ();
                result = (ResponseType)winIncome.Run ();
                winIncome.Destroy ();
                if (result == ResponseType.Ok) {
                    UpdateCashIncome ();
                    CalculateTotalCash ();
                }
                break;
            case 1:
                treeviewExpense.Selection.GetSelected (out iter);
                itemid = Convert.ToInt32 (CashExpenseSort.GetValue (iter, (int)CashExpenseCol.id));
                ExpenseSlip winExpense = new  ExpenseSlip ();
                winExpense.SlipFill (itemid, false);
                winExpense.Show ();
                result = (ResponseType)winExpense.Run ();
                winExpense.Destroy ();
                if (result == ResponseType.Ok) {
                    UpdateCashExpense ();
                    CalculateTotalCash ();
                }
                break;
            case 2:
                treeviewAdvance.Selection.GetSelected (out iter);
                itemid = Convert.ToInt32 (CashAdvanceSort.GetValue (iter, (int)CashAdvanceCol.id));
                AdvanceStatement winAdvance = new AdvanceStatement ();
                winAdvance.StatementFill (itemid, false);
                winAdvance.Show ();
                result = (ResponseType)winAdvance.Run ();
                winAdvance.Destroy ();
                if (result == ResponseType.Ok)
                    UpdateCashAdvance ();
                break;
            }
            break;
        case 5:
            treeviewEvents.Selection.GetSelected (out iter);
            itemid = Convert.ToInt32 (EventsListStore.GetValue (iter, 0));
            Event winEvent = new Event ();
            winEvent.EventFill (itemid);
            winEvent.Show ();
            result = (ResponseType)winEvent.Run ();
//.........这里部分代码省略.........
开发者ID:QualitySolution,项目名称:Bazar,代码行数:101,代码来源:MainWindow.cs

示例3: OnButtonAddClicked

 protected virtual void OnButtonAddClicked(object sender, System.EventArgs e)
 {
     switch (notebookMain.CurrentPage) {
     case 0:
         Place winPlace = new Place (true);
         winPlace.Show ();
         winPlace.Run ();
         winPlace.Destroy ();
         UpdatePlaces ();
         break;
     case 1:
         lessee winLessee = new lessee ();
         winLessee.NewLessee = true;
         winLessee.Show ();
         winLessee.Run ();
         winLessee.Destroy ();
         UpdateLessees ();
         break;
     case 2:
         Contract winContract = new Contract ();
         winContract.NewContract = true;
         winContract.Show ();
         winContract.Run ();
         winContract.Destroy ();
         UpdateContract ();
         break;
     case 3:
         Accrual winAccrual = new Accrual ();
         winAccrual.NewAccrual = true;
         winAccrual.Show ();
         winAccrual.Run ();
         winAccrual.Destroy ();
         UpdateAccrual ();
         break;
     case 4:
         switch (notebookCash.CurrentPage) {
         case 0:
             IncomeSlip winIncomeSlip = new IncomeSlip ();
             winIncomeSlip.NewSlip = true;
             winIncomeSlip.Show ();
             winIncomeSlip.Run ();
             winIncomeSlip.Destroy ();
             UpdateCashIncome ();
             CalculateTotalCash ();
             break;
         case 1:
             ExpenseSlip winExpenseSlip = new ExpenseSlip ();
             winExpenseSlip.NewSlip = true;
             winExpenseSlip.Show ();
             winExpenseSlip.Run ();
             winExpenseSlip.Destroy ();
             UpdateCashExpense ();
             CalculateTotalCash ();
             break;
         case 2:
             AdvanceStatement winAdvance = new AdvanceStatement ();
             winAdvance.NewStatement = true;
             winAdvance.Show ();
             winAdvance.Run ();
             winAdvance.Destroy ();
             UpdateCashAdvance ();
             break;
         }
         break;
     case 5:
         Event winEvent = new Event ();
         winEvent.NewEvent = true;
         winEvent.Show ();
         winEvent.Run ();
         winEvent.Destroy ();
         UpdateEvents ();
         break;
     default:
         break;
     }
 }
开发者ID:QualitySolution,项目名称:Bazar,代码行数:76,代码来源:MainWindow.cs

示例4: OnButtonOpenContractClicked

        protected void OnButtonOpenContractClicked(object sender, EventArgs e)
        {
            TreeIter iter;
            comboContract.GetActiveIter(out iter);
            int itemid = (int) comboContract.Model.GetValue (iter, 1);

            Contract winContract = new Contract();
            winContract.ContractFill(itemid);
            winContract.Show();
            winContract.Run();
            winContract.Destroy();
        }
开发者ID:QualitySolution,项目名称:Bazar,代码行数:12,代码来源:Accrual.cs

示例5: OnButtonNewContractClicked

 protected void OnButtonNewContractClicked(object sender, EventArgs e)
 {
     Contract winContract = new Contract();
     winContract.NewContract = true;
     winContract.Show();
     winContract.SetPlace (type_id, PlaceNumber);
     winContract.Run();
     winContract.Destroy();
     FillCurrentContract ();
 }
开发者ID:QualitySolution,项目名称:Bazar,代码行数:10,代码来源:Place.cs

示例6: OnButtonContractClicked

 protected void OnButtonContractClicked(object sender, EventArgs e)
 {
     Contract winContract = new Contract();
     winContract.ContractFill(ContractId);
     winContract.Show();
     winContract.Run();
     winContract.Destroy();
     FillCurrentContract ();
 }
开发者ID:QualitySolution,项目名称:Bazar,代码行数:9,代码来源:Place.cs


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