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


C# Route.LoadAll方法代码示例

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


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

示例1: AdjustLabelsForHub

        private void AdjustLabelsForHub()
        {
            this.Name = "Hub Settings";

            Route r = new Route();
            r.LoadAll();
            gridRoute.DataSource = r.DefaultView;
        }
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-warehouse,代码行数:8,代码来源:DeliverySettings.cs

示例2: ManageItems_Load

 private void ManageItems_Load(object sender, EventArgs e)
 {
     cboStores.SetupActivityEditor().SetDefaultActivity();
     // Bind the routes
     Route route = new Route();
     route.LoadAll();
     lkRoute.Properties.DataSource = route.DefaultView;
 }
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-warehouse,代码行数:8,代码来源:LogPicklist.cs

示例3: ManageItems_Load

        private void ManageItems_Load(object sender, EventArgs e)
        {
            lkCategories.Properties.DataSource = BLL.CommodityType.GetAllTypes();
            lkCategories.ItemIndex = 0;

            dtFrom.Value = DateTime.Today;
            dtTo.Value = DateTime.Today;

            Activity stor = new Activity();
            stor.LoadAll();
            DataView dv = stor.DefaultView;
            cboStores.Properties.DataSource = stor.DefaultView;
            cboStores.ItemIndex = 0;
            Route route = new Route();
            route.LoadAll();
            lkRoutes.Properties.DataSource = route.DefaultView;
            lkRoutes.EditValue = route.RouteID;
            _IsReady = true;
               //     PopulateItemList();
        }
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-warehouse,代码行数:20,代码来源:IssuesByReceivingUnits.cs

示例4: ManageItems_Load

        /// <summary>
        /// Handles the Load event of the ManageItems control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
        private void ManageItems_Load(object sender, EventArgs e)
        {
            btnPrint.Enabled = this.HasPermission("Print");
            btnReprint.Enabled = this.HasPermission("Re-Print");
            btnExport.Enabled = this.HasPermission("Export");

            if (BLL.Settings.ShowMissingSTVsOnIssueLog)
            {
                grpOrdersWithMissingSTVs.Visibility = LayoutVisibility.Always;
                // DO the binding
                gridMissingOrders.DataSource = Order.GetMissingSTVs(CurrentContext.UserId);
            }
            else
            {
                grpOrdersWithMissingSTVs.Visibility = LayoutVisibility.Never;
            }

            lkAccount.SetupAccountEditor().SetDefaultAccount();

            var paymentType = new PaymentType();
            paymentType.LoadAll();
            lkPaymentTypeFilter.Properties.DataSource = paymentType.DefaultView;
            // Bind the routes
            var route = new Route();
            route.LoadAll();
            lkRoute.Properties.DataSource = route.DefaultView;

            // make the date defaults the current date
            dtFrom.Value = DateTimeHelper.ServerDateTime;
            dtTo.Value = DateTimeHelper.ServerDateTime;
        }
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-warehouse,代码行数:36,代码来源:LogIssues.cs

示例5: btnSaveRoute_Click

        private void btnSaveRoute_Click(object sender, EventArgs e)
        {
            if (routeValidation.Validate())
            {
                if (route.RowCount == 0)
                {
                    route.AddNew();
                }

                route.Name = txtRouteName.Text;
                route.Save();

                if (rusForRoute.RowCount > 0)
                {
                    rusForRoute.Save();
                }
                Route r = new Route();
                r.LoadAll();
                gridRoute.DataSource = r.DefaultView;

                btnAddRoute.Enabled = (BLL.Settings.UseNewUserManagement) ? this.HasPermission("Add-Route") : true;

                XtraMessageBox.Show("Your changes have been saved.", "Confirmation", MessageBoxButtons.OK,
                                    MessageBoxIcon.Information);
            }
        }
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-warehouse,代码行数:26,代码来源:DeliverySettings.cs

示例6: ReceivingUnitsDetails_Load

        private void ReceivingUnitsDetails_Load(object sender, EventArgs e)
        {
            LoadReceivingUnits();

            if (ID != -1)
            {

                lcExistingInstitutions.Visibility = LayoutVisibility.Never;
                lcIsUsedInFacility.Visibility = LayoutVisibility.Always;

                int selected = ID;
                Institution recUnit = new Institution();
                recUnit.LoadByPrimaryKey(selected);
                txtReceivingUnit.Text = recUnit.IsColumnNull("Name") ? "" : recUnit.Name;;
                txtReceivingUnit.Enabled = false;
                txtDescription.Text = recUnit.IsColumnNull("Description") ? "" : recUnit.Description;
                txtPhone.Text = recUnit.IsColumnNull("Phone") ? "" : recUnit.Phone;

                if (!recUnit.IsColumnNull("Ownership"))
                    lkOwnership.EditValue = recUnit.Ownership;
                if (!recUnit.IsColumnNull("RUType"))
                    lkRUType.EditValue = recUnit.RUType;
                txtLicenseNo.Text = recUnit.IsColumnNull("LicenseNo") ? "" : recUnit.LicenseNo;
                txtVATNo.Text = recUnit.IsColumnNull("VATNo") ? "" : recUnit.VATNo;
                txtTinNo.Text = recUnit.IsColumnNull("TinNo") ? "" : recUnit.TinNo;

                chkIsInstitutionUsedAtFacility.Checked = recUnit.IsColumnNull("IsUsedAtFacility") ? false : recUnit.IsUsedAtFacility;
                dtRegistration.Value = recUnit.IsColumnNull("DateOfRegistration") ? DateTimeHelper.ServerDateTime : recUnit.DateOfRegistration;
                if (!recUnit.IsColumnNull("Woreda"))
                {
                    BLL.Woreda woreda = new Woreda();
                    woreda.LoadByPrimaryKey(recUnit.Woreda);

                    BLL.Zone zone = new Zone();
                    zone.LoadByPrimaryKey(woreda.ZoneID);

                    BLL.Region region = new BLL.Region();
                    region.LoadByPrimaryKey(zone.RegionId);

                    lkRegion.EditValue = region.ID;

                    lkZone.Properties.DataSource = BLL.Zone.GetZoneByRegion(region.ID).DefaultView;
                    lkZone.EditValue = zone.ID;

                    Woreda.GetWoredaByZone(zone.ID);
                    lkWoreda.Properties.DataSource = woreda.DefaultView;
                    lkWoreda.EditValue = recUnit.Woreda;
                }
                else if (!recUnit.IsColumnNull("Zone")) //We allow the Woreda to be empty so, let's check the zone now.
                {
                    BLL.Zone zone = new Zone();
                    zone.LoadByPrimaryKey(recUnit.Zone);

                    BLL.Region region = new BLL.Region();
                    region.LoadByPrimaryKey(zone.RegionId);

                    lkRegion.EditValue = region.ID;

                    lkZone.Properties.DataSource = BLL.Zone.GetZoneByRegion(region.ID).DefaultView;
                    lkZone.EditValue = zone.ID;
                }
                else
                {
                    lkRegion.EditValue = null;
                    lkZone.EditValue = null;
                    lkWoreda.EditValue = null;
                }

                Route r = new Route();
                r.LoadAll();
                lkRoute.Properties.DataSource = r.DefaultView;

                lkRoute.EditValue = (recUnit.IsColumnNull("Route")) ? 0 : recUnit.Route;
                receivingUnitId = recUnit.ID;

                bool isItDraft = !recUnit.IsColumnNull("IsDraft") && recUnit.IsDraft &&
                                 (BLL.Order.GetTotalForAnInstitution(recUnit.ID) == 0);

                lkRegion.Enabled = isItDraft;
                lkZone.Enabled = isItDraft;
                lkWoreda.Enabled = isItDraft;
                lkRUType.Enabled = isItDraft;
                lkOwnership.Enabled = isItDraft;
                txtReceivingUnit.Enabled = isItDraft;

            }
            else
            {
                lcExistingInstitutions.Visibility=LayoutVisibility.Always;
                lcIsUsedInFacility.Visibility = LayoutVisibility.Never;
            }
        }
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-warehouse,代码行数:92,代码来源:ReceivingUnitsDetails.cs

示例7: LoadReceivingUnits

        private void LoadReceivingUnits()
        {
            BLL.Region reg = new BLL.Region();
            reg.LoadAll();
            lkRegion.Properties.DataSource = reg.DefaultView;

            BLL.InstitutionType ruType = new InstitutionType();
            ruType.Where.IsActive.Value = 1;
            ruType.Query.Load();
            lkRUType.Properties.DataSource = ruType.DefaultView;

            BLL.OwnershipType ownershipType = new OwnershipType();
            ownershipType.LoadAll();
            lkOwnership.Properties.DataSource = ownershipType.DefaultView;

            Route r = new Route();
            r.LoadAll();
            lkRoute.Properties.DataSource = r.DefaultView;
        }
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-warehouse,代码行数:19,代码来源:ReceivingUnitsDetails.cs


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