Beispiel #1
0
 private void value_NodeExpand(object sender, RadTreeViewEventArgs tvea)
 {
     if (tvea.Node.Selected)
     {
         this.UpdateBreadCrumb(tvea.Node);
     }
 }
Beispiel #2
0
        private void RadTreeView1_SelectedNodeChanged(object sender, Telerik.WinControls.UI.RadTreeViewEventArgs e)
        {
            if (ControlTraceMonitor.AnalyticsMonitor != null)
            {
                ControlTraceMonitor.AnalyticsMonitor.TrackAtomicFeature("ViewChanged." + e.Node.Name);
            }
            switch (e.Node.Name)
            {
            case "bangGiaInNode":
                topControl1.ViewLabel.Text = "Bảng giá In";
                AttachGridControl <BangGiaInGiaCongControl>(ref bangGiasControl);
                break;

                /*
                 * case "instructionsNode":
                 *  topControl1.ViewLabel.Text = "Instructions";
                 *  AttachInfoControl("Instructions.pdf");
                 *  break;
                 * case "documentationNode":
                 *  topControl1.ViewLabel.Text = "Documentation";
                 *  AttachInfoControl("Documentation.pdf");
                 *  break;
                 * case "storesNode":
                 *  topControl1.ViewLabel.Text = "Stores";
                 *  AttachGridControl<StoresControl>(ref storesControl);
                 *  break;
                 * case "suppliersNode":
                 *  topControl1.ViewLabel.Text = "Vendors";
                 *  AttachGridControl<VendorsControl>(ref vendorsControl);
                 *  break;
                 * case "purchasesNode":
                 *  topControl1.ViewLabel.Text = "Purchase Orders";
                 *  AttachGridControl<PurchasesControl>(ref purchasesControl);
                 *  break;
                 * case "productInventoryNode":
                 *  topControl1.ViewLabel.Text = "Product Inventory";
                 *  AttachGridControl<InventoriesControl>(ref inventoriesControl);
                 *  break;
                 * case "billOfMaterialsNode":
                 *  topControl1.ViewLabel.Text = "Bill Of Materials";
                 *  AttachGridControl<BillOfMaterialsControl>(ref billOfMaterialsControl);
                 *  break;
                 * case "workOrdersNode":
                 *  topControl1.ViewLabel.Text = "Work Orders";
                 *  AttachGridControl<WorkOrdersControl>(ref workOrdersControl);
                 *  break;
                 * case "individualsNode":
                 *  topControl1.ViewLabel.Text = "Individuals";
                 *  AttachGridControl<IndividualsControl>(ref individualsControl);
                 *  break;
                 * case "ordersNode":
                 *  topControl1.ViewLabel.Text = "Sales Orders";
                 *  AttachGridControl<OrdersControl>(ref ordersControl);
                 *  break;
                 */
            }
        }
Beispiel #3
0
        private void radDataFilter1_NodeAdded(object sender, RadTreeViewEventArgs e)
        {
            DataFilterCriteriaNode node = e.Node as DataFilterCriteriaNode;

            if (node == null)
            {
                return;
            }
            node.Descriptor.PropertyName = this.column.Name;
        }
Beispiel #4
0
        private void unite_phase1_SelectedNodeChanged(object sender, Telerik.WinControls.UI.RadTreeViewEventArgs e)
        {
            RadTreeNode treeUnite;

            treeUnite = tree_unite_phase1.SelectedNode;
            if (!treeUnite.Level.Equals(0))
            {
                btncharger.Enabled = true;
            }
            else
            {
                btncharger.Enabled = false;
            }
        }
        protected virtual void OnStructureTreeViewSelectedNodeChanged(
            object sender,
            RadTreeViewEventArgs e)
        {
            if (e.Node == null || !e.Node.Selected)
            {
                return;
            }
            LayoutControlItemBase tag = e.Node.Tag as LayoutControlItemBase;

            if (tag == null)
            {
                return;
            }
            this.layoutControl.DragOverlay.SelectLayoutItem(tag);
        }
Beispiel #6
0
        private void RadTreeView1_SelectedNodeChanged(object sender, Telerik.WinControls.UI.RadTreeViewEventArgs e)
        {
            if (ControlTraceMonitor.AnalyticsMonitor != null)
            {
                ControlTraceMonitor.AnalyticsMonitor.TrackAtomicFeature("ViewChanged." + e.Node.Name);
            }
            switch (e.Node.Name)
            {
            case "overview":
                topControl1.ViewLabel.Text = "overview";
                tableLayoutPanel1.Controls.Remove(tableLayoutPanel1.GetControlFromPosition(1, 2));
                tableLayoutPanel1.Controls.Add(projectOverviewControl, 1, 2);
                break;

            case "details":
                topControl1.ViewLabel.Text = "details";
                tableLayoutPanel1.Controls.Remove(tableLayoutPanel1.GetControlFromPosition(1, 2));
                tableLayoutPanel1.Controls.Add(projectDetailsControl, 1, 2);
                break;
            }
        }
 private void treeView_NodeCheckedChanged(object sender, RadTreeViewEventArgs e)
 {
     this.TreeView.NodeCheckedChanged -= new TreeNodeCheckedEventHandler(this.treeView_NodeCheckedChanged);
     if (e.Node == this.allNode && (this.allNode.CheckState == Telerik.WinControls.Enumerations.ToggleState.On || this.allNode.CheckState == Telerik.WinControls.Enumerations.ToggleState.Indeterminate))
     {
         this.nullNode.CheckState    = Telerik.WinControls.Enumerations.ToggleState.Off;
         this.nonNullNode.CheckState = Telerik.WinControls.Enumerations.ToggleState.Off;
     }
     else if (e.Node == this.nullNode && this.nullNode.CheckState == Telerik.WinControls.Enumerations.ToggleState.On)
     {
         this.allNode.CheckState     = Telerik.WinControls.Enumerations.ToggleState.Off;
         this.nonNullNode.CheckState = Telerik.WinControls.Enumerations.ToggleState.Off;
         this.selectedValues.Clear();
     }
     else if (e.Node == this.nonNullNode && this.nonNullNode.CheckState == Telerik.WinControls.Enumerations.ToggleState.On)
     {
         this.allNode.CheckState  = Telerik.WinControls.Enumerations.ToggleState.Off;
         this.nullNode.CheckState = Telerik.WinControls.Enumerations.ToggleState.Off;
         this.selectedValues.Clear();
     }
     this.UpdateNodeSelectionOnCheckedChanged(e.Node);
     this.TreeView.NodeCheckedChanged += new TreeNodeCheckedEventHandler(this.treeView_NodeCheckedChanged);
     this.OnSelectionChanged();
 }
        private void baridTreeView1_SelectedNodeChanged(object sender, Telerik.WinControls.UI.RadTreeViewEventArgs e)
        {
            try
            {
                CurrentNode = e.Node;
                Cursor      = Cursors.WaitCursor;
                switch (CurrentNode.Name)
                {
                case "NodeAgree":
                    //  baridTreeView1.Nodes["NodeManagement"].Nodes["NodeVehicleType"].Visible = true;
                    //baridTreeView1.Nodes["NodeManagement"].Nodes.Refresh();
                    //baridTreeView1.Refresh();
                    //  break;
                    var frmNodeAgree = new gatepass.ui.agreement.frm_Agreements();
                    frmNodeAgree.ShowDialog();
                    frmNodeAgree.Close();
                    frmNodeAgree.Dispose();
                    break;

                case "NodeGroup":
                    var frmNodeGroup = new gatepass.ui.group.frm_groups();
                    frmNodeGroup.ShowDialog();
                    frmNodeGroup.Close();
                    frmNodeGroup.Dispose();
                    break;

                case "NodeOffice":
                    //   baridTreeView1.Nodes["NodeManagement"].Nodes["NodeVehicleType"].Visible = false;
                    //baridTreeView1.Nodes["NodeManagement"].Nodes.Refresh();
                    //baridTreeView1.Refresh();
                    //  break;
                    var frmNodeOffice = new gatepass.ui.office.frm_offices();
                    frmNodeOffice.ShowDialog();
                    frmNodeOffice.Close();
                    frmNodeOffice.Dispose();
                    break;

                case "NodeOper":
                    var frmNodeOper = new gatepass.ui.operators.frm_operators();
                    frmNodeOper.ShowDialog();
                    frmNodeOper.Close();
                    frmNodeOper.Dispose();
                    break;

                case "NodePerson":
                    var frmNodePerson = new gatepass.ui.person.frm_person();
                    frmNodePerson.ShowDialog();
                    frmNodePerson.Close();
                    frmNodePerson.Dispose();
                    break;

                case "NodeVehicleType":
                    var frmNodeVehicleType = new gatepass.ui.vehicle.frm_vehicleTypes();
                    frmNodeVehicleType.ShowDialog();
                    frmNodeVehicleType.Close();
                    frmNodeVehicleType.Dispose();
                    break;

                case "NodeVehicles":
                    var frmNodeVehicles = new gatepass.ui.vehicle.frm_vehicles();
                    frmNodeVehicles.ShowDialog();
                    frmNodeVehicles.Close();
                    frmNodeVehicles.Dispose();
                    break;

                case "NodeTravelArea":
                    var frmNodeTravelArea = new gatepass.ui.travelarea.frm_travelAreas();
                    frmNodeTravelArea.ShowDialog();
                    frmNodeTravelArea.Close();
                    frmNodeTravelArea.Dispose();
                    break;

                case "NodeBLReasons":
                    var frmNodeBLReasons = new gatepass.ui.blacklist.frm_blacklistReasons();
                    frmNodeBLReasons.ShowDialog();
                    frmNodeBLReasons.Close();
                    frmNodeBLReasons.Dispose();
                    break;

                case "NodeBlackLists":
                    var frmNodeBlackLists = new gatepass.ui.blacklist.frm_blacklists();
                    frmNodeBlackLists.ShowDialog();
                    frmNodeBlackLists.Close();
                    frmNodeBlackLists.Dispose();
                    break;

                case "NodeCreateGp":
                    //var frmCreateGp = new gatepass.ui.package.frm_GatePasses ();
                    //frmCreateGp = new gatepass.ui.package.frm_GatePasses ();
                    //frmCreateGp.pmStatus = ItemsPublic.IndexStatus.toNew;
                    //frmCreateGp.IndexPack = null;
                    //frmCreateGp.isNew=true;
                    //frmCreateGp.ShowDialog ();
                    //frmCreateGp.Close ();
                    //frmCreateGp.Dispose ();
                    var frmSet   = new gatepass.ui.package.frm_SettingPack();
                    var frmPackM = new gatepass.ui.package.frm_GatePasses();
                    frmPackM.pmStatus  = ItemsPublic.IndexStatus.toNew;
                    frmPackM.IndexPack = null;
                    frmPackM.isNew     = true;
                    //	 frmPackM.

                    var frmAddPersons = new gatepass.ui.package.frm_SelectOrAddPersons4();
                    frmAddPersons.ShowDialog();
                    if (frmAddPersons.DialogResult == DialogResult.OK)
                    {
                        //	frmAddPersons.ShowDialog();
                        if (frmAddPersons.State)
                        {
                            //MainRadGridView.DataSource=null;
                            //MainRadGridView.SelectAll();
                            //frmPackM.MainRadGridView.AllowAddNewRow = true;
                            frmPackM.IsnewRowAdded = true;
                            //frmPackM.MainRadGridView.CurrentRow = null;
                            //MainRadGridView.Rows.RemoveAt(0);
                            //frmPackM.MainRadGridView.DataSource = null;
                            //MainRadGridView.EndInit();
                            //MainRadGridView.EndUpdate();
                            //	MainRadGridView.EndEdit();
                            //while (MainRadGridView.Rows.Count > 0)
                            //{
                            //    MainRadGridView.Rows.RemoveAt(0);
                            //}

                            for (int count = 0; count < frmAddPersons.radGridViewSelected.Rows.Count; count++)
                            {
                                #region set rows

                                frmPackM.MainRadGridView.Rows.AddNew();
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_ID"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_ID"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_NationalCode"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_NationalCode"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_isWoman"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_isWoman"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_IdentifyCode"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_IdentifyCode"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_LicenseDriverCode"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_LicenseDriverCode"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_Name"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_Name"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_Surname"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_Surname"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_FatherName"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_FatherName"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_BirthCity"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_BirthCity"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_RegisterCity"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_RegisterCity"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_Nationality"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_Nationality"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_BirthDate"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_BirthDate"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_Phone1"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_Phone1"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_Phone2"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_Phone2"].Value;
                                //						frmPackM.MainRadGridView.CurrentRow.Cells["Person_Picture"].Value = frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_Picture"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_HaveForm"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_HaveForm"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_RegisterCode"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_RegisterCode"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Person_LabelIsWoman"].Value =
                                    frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_LabelIsWoman"].Value;
                                frmPackM.MainRadGridView.CurrentRow.Cells["Gatepass_ID"].Value       = -1;
                                frmPackM.MainRadGridView.CurrentRow.Cells["GatePass_IntPrint"].Value = -1;
                                frmPackM.MainRadGridView.CurrentRow.Cells["GatePass_IsDriver"].Value = false;
                                frmPackM.MainRadGridView.CurrentRow.Cells["GatePass_TimeLock"].Value = null;
                                frmPackM.MainRadGridView.CurrentRow.Cells["GatePass_LockerId"].Value = -1;
                                frmPackM.MainRadGridView.CurrentRow.Cells["package_Id"].Value        = -1;
                                if (frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_Picture"].Value != null)
                                {
                                    using (var ms = new System.IO.MemoryStream())
                                    {
                                        ((Bitmap)frmAddPersons.radGridViewSelected.Rows[count].Cells["Person_Picture"].Value).
                                        Save(ms,
                                             System.
                                             Drawing
                                             .
                                             Imaging
                                             .
                                             ImageFormat
                                             .Jpeg);
                                        var picture = ms.ToArray();
                                        frmPackM.MainRadGridView.CurrentRow.Cells["Person_Picture"].Value = picture.Length > 0
                                                                                                                                                        ? picture
                                                                                                                                                        : null;
                                    }
                                }
                                else
                                {
                                    frmPackM.MainRadGridView.CurrentRow.Cells["Person_Picture"].Value = null;
                                }

                                #endregion
                            }
                            frmPackM.MainRadGridView.AllowAddNewRow = false;
                            frmPackM.IsnewRowAdded = false;
                            //frmPackM.MainRadGridView.Refresh();

                            //frmSet = new gatepass.ui.package.frm_SettingPack();
                            frmSet.ShowDialog();
                            if (frmSet.DialogResult == DialogResult.OK)
                            {
                                frmPackM.SetSetting(frmSet.uC_packDetailsForNew1);
                                frmPackM.ShowDialog();
                            }
                            //result = frmPackM.gotResult ();
                            //result = frmPackM.DialogResult == DialogResult.OK ? frmPackM.gotResult() : null;
                        }
                        frmPackM.Close();
                        frmPackM.Dispose();
                        frmSet.Close();
                        frmSet.Dispose();
                        frmAddPersons.Close();
                        frmAddPersons.Dispose();
                    }
                    break;

                case "NodeListPacks":
                    var frmListPacks = new gatepass.ui.package.frm_packs();
                    frmListPacks.ShowDialog();
                    frmListPacks.Close();
                    frmListPacks.Dispose();
                    break;
                }
                Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                Cursor = Cursors.Default;
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #9
0
 private void owner_NodeExpandedChanged(object sender, RadTreeViewEventArgs e)
 {
     this.NotifyClients(AccessibleEvents.SelectionRemove, this.GetChildIndex(e.Node));
     this.NotifyClients(AccessibleEvents.SelectionAdd, this.GetChildIndex(e.Node));
     this.NotifyClients(AccessibleEvents.Focus, this.GetChildIndex(e.Node));
 }
Beispiel #10
0
 private void owner_SelectedNodeChanged(object sender, RadTreeViewEventArgs e)
 {
     this.NotifyClients(AccessibleEvents.Focus, this.GetChildIndex(e.Node));
 }
Beispiel #11
0
 private void value_Selected(object sender, RadTreeViewEventArgs e)
 {
     UpdateBreadCrumb(this.defaultTreeView.SelectedNode);
 }
 private void treeView_NodeMouseClick(object sender, RadTreeViewEventArgs e)
 {
     e.Node.Checked = !e.Node.Checked;
 }
Beispiel #13
0
 void owner_SelectedNodeChanged(object sender, RadTreeViewEventArgs e)
 {
     this.NotifyClients(AccessibleEvents.Focus | AccessibleEvents.Selection, 0);
 }