Ejemplo n.º 1
0
        public override void Refresh()
        {
            this._detail = this.processCategoryManager.Select();
            this.bindingSource1.DataSource = this._detail;
            if (this.action == "insert")
            {
                Model.ProcessCategory cate = new Book.Model.ProcessCategory();
                cate.ProcessCategoryId   = Guid.NewGuid().ToString();
                cate.ProcessCategoryName = string.Empty;
                //cate.Description = string.Empty;
                cate.Id = string.Empty;
                this._detail.Add(cate);
                this.bindingSource1.Position = this.bindingSource1.IndexOf(cate);
                this.gridControl1.RefreshDataSource();
            }
            switch (this.action)
            {
            case "insert":
                this.gridView1.OptionsBehavior.Editable = true;
                break;

            case "update":
                this.gridView1.OptionsBehavior.Editable = true;
                break;

            case "view":
                this.gridView1.OptionsBehavior.Editable = false;
                break;

            default:
                break;
            }
            base.Refresh();
        }
Ejemplo n.º 2
0
 protected override void grid_keyDpwn()
 {
     Model.ProcessCategory cate = new Book.Model.ProcessCategory();
     cate.ProcessCategoryId   = Guid.NewGuid().ToString();
     cate.ProcessCategoryName = string.Empty;
     cate.Id = string.Empty;
     this._detail.Add(cate);
     this.bindingSource1.Position = this.bindingSource1.IndexOf(cate);
 }
Ejemplo n.º 3
0
        //public IList<Model.Processing> Select(Book.Model.Customer customer)
        //{
        //    return accessor.Select(customer);
        //}

        public IList <Book.Model.Processing> Select(Book.Model.ProcessCategory processCategory)
        {
            return(accessor.Select(processCategory));
        }