예제 #1
0
        void deatilGridBar_ItemClicked(object sender, ToolBar.ToolBarItemClickArgs e)
        {
            if (e.Key == "S1")
            {
                this.SumType = 0;
            }
            else
            {
                this.SumType = 1;
            }
            //this.InitData();
            DetailGrid grid = this.EditForm.FindControl("OrderGrid") as DetailGrid;

            if (grid != null)
            {
                if (this.SumType == 0)
                {
                    int i = 1;
                    if (grid.ADGrid.Columns[0].GetType() == typeof(DataGridIconColumn))
                    {
                        i = 2;
                    }
                    grid.ADGrid.Columns[i - 1].Visibility = Visibility.Visible;
                    grid.ADGrid.Columns[i].Visibility     = Visibility.Visible;
                    grid.ADGrid.Columns[i + 3].Visibility = Visibility.Visible;

                    grid.ADGrid.Columns[i + 1].Visibility = Visibility.Collapsed;
                    grid.ADGrid.Columns[i + 2].Visibility = Visibility.Collapsed;
                    grid.ADGrid.Columns[i + 4].Visibility = Visibility.Collapsed;
                    grid.ADGrid.Columns[i + 5].Visibility = Visibility.Collapsed;

                    grid.ItemsSource = this.OrderEntity.GetRelationFBEntities(typeof(V_SubjectCompanySum).Name);
                }
                else
                {
                    int i = 1;
                    if (grid.ADGrid.Columns[0].GetType() == typeof(DataGridIconColumn))
                    {
                        i = 2;
                    }
                    grid.ADGrid.Columns[i - 1].Visibility = Visibility.Collapsed;
                    grid.ADGrid.Columns[i].Visibility     = Visibility.Collapsed;

                    grid.ADGrid.Columns[i + 2].Visibility = Visibility.Visible;
                    grid.ADGrid.Columns[i + 1].Visibility = Visibility.Visible;
                    grid.ADGrid.Columns[i + 3].Visibility = Visibility.Visible;
                    grid.ADGrid.Columns[i + 4].Visibility = Visibility.Visible;
                    if ((this.EditForm.OperationType == OperationTypes.Add ||
                         this.EditForm.OperationType == OperationTypes.Edit ||
                         this.EditForm.OperationType == OperationTypes.ReSubmit))
                    {
                        grid.ADGrid.Columns[i + 5].Visibility = Visibility.Visible;
                    }

                    grid.ItemsSource = this.OrderEntity.GetRelationFBEntities(typeof(T_FB_COMPANYBUDGETSUMDETAIL).Name);
                }
            }
        }
예제 #2
0
        void tooBarTop_ItemClicked(object sender, ToolBar.ToolBarItemClickArgs e)
        {
            if (this.ADtGrid.SelectedItems.Count == 0)
            {
                CommonFunction.NotifySelection(null);
                return;
            }

            OrderEntity orderEntity = this.ADtGrid.SelectedItem as OrderEntity;

            ShowEditForm(orderEntity, OperationTypes.Browse);
        }
예제 #3
0
        private void tooBarTop_ItemClicked(object sender, ToolBar.ToolBarItemClickArgs e)
        {
            switch (e.Key)
            {
            case "Save":
                this.editForm.Save();
                break;

            case "CheckBudget":
                CheckBudget();
                break;
            }
        }
예제 #4
0
        void deatilGridBar_ItemClicked(object sender, ToolBar.ToolBarItemClickArgs e)
        {
            switch (e.Key)
            {
                case "New" :
                    OnToolBarItemClick(Actions.Add);
                    break;
                case "Delete" :
                    OnToolBarItemClick(Actions.Delete);
                    break;

            }
        }
예제 #5
0
        public void tooBarTop_ItemClicked(object sender, ToolBar.ToolBarItemClickArgs e)
        {
            try
            {
                ShowProcess();

                Save();
            }
            catch (Exception ex)
            {
                CommonFunction.ShowErrorMessage(ex.Message);
                CloseProcess();
            }
        }
예제 #6
0
        void deatilGridBar_ItemClicked(object sender, ToolBar.ToolBarItemClickArgs e)
        {
            switch (e.Key)
            {
            case "New":
                Add();
                break;

            case "Delete":
                IList list = this.AGrid.SelectedItems as IList;
                Delete(list);
                break;
            }
        }
예제 #7
0
 private void tooBarTop_ItemClicked(object sender, ToolBar.ToolBarItemClickArgs e)
 {
     try
     {
         ShowProcess();
         //  ComfirmWindow.ConfirmationBoxs("提示", "测试页面", Utility.GetResourceStr("CONFIRM"), MessageIcon.Question);
         Save();
     }
     catch (Exception ex)
     {
         CommonFunction.ShowErrorMessage(ex.Message);
         CloseProcess();
     }
 }
예제 #8
0
        void tooBarTop_ItemClicked(object sender, ToolBar.ToolBarItemClickArgs e)
        {
            switch (e.Key)
            {
            case "AddType":
                AddType();
                break;

            case "AddSubject":
                AddSubject();
                break;

            case "AddSubSubject":
                AddSubSubject();
                break;

            case "Save":
                try
                {
                    ShowProcess();
                    bool isCheck = Save();

                    if (!isCheck)
                    {
                        CloseProcess();
                    }
                }
                catch (Exception ex)
                {
                    CommonFunction.ShowErrorMessage(ex.Message);
                    CloseProcess();
                }
                break;

            case "Delete":
                Delete();
                break;
            }
        }