コード例 #1
0
 public ActionBase()
 {
     editable    = true;
     multiselect = false;
     //returnOnMatch = true; VA
     returnType = SelectionFormReturnType.AsIs;
 }
コード例 #2
0
 protected abstract mymodel.Entity[] ShowSelectionList(string searchField, object searchValue, bool returnOnMatch, bool editable, bool multiselect, SelectionFormReturnType returntype);
コード例 #3
0
 public SelectionFormBase()
 {
     returntype  = SelectionFormReturnType.AsIs;
     multiselect = false;
 }
コード例 #4
0
ファイル: frmListForm.cs プロジェクト: noseii/powerscada2011
        Entity[] ISelectionForm.ShowSelectionList(string searchField, object searchValue, bool returnOnMatch, bool editable, bool multiselect, SelectionFormReturnType returntype)
        {
            this.multiSelect = multiselect;
            this.returnType = returntype;

            closeAction = DialogResult.OK;

            if (editable)
                State = ListFormState.EditAndSelect;
            else
                State = ListFormState.SelectOnly;

            if (multiselect == false && returnOnMatch == true)
            {
                //SearchField ve SearchValue değerine göre bir nesne bulunursa Select modunda döndürülür.
                Entity theEntity = SearchEntity(searchField, searchValue.ToString());
                if (theEntity == null)
                {
                    secilenNesne = null;
                    secilenData = null;
                }
                else
                {
                    secilenNesne = new Entity[1];
                    secilenNesne[0] = theEntity;
                    try
                    {
                        secilenData = Persistence.ReadListTable(EntityType, new string[] { "*" }, null, null, 100);
                    }
                    catch
                    {
                        try
                        {
                            secilenData = Persistence.ReadListTable(EntityType, new string[] { "*" }, null, null, 100);
                        }
                        catch
                        {
                            secilenData = null;
                        }
                    }
                    this.Dispose(true);
                    return secilenNesne;
                }
            }

            frmListForm_Load(this, new System.EventArgs());
            //InitSelectList();

            if (multiselect)
            {
                //InitSelectSearch("", "");
            }
            else
            {
                if (returnOnMatch)
                {

                }
                //ListForm_Load(this, new System.EventArgs());
                //InitSelectList();
                //InitSelectSearch(searchField, searchValue == null ? "" : searchValue.ToString());
            }

            if (AlwaysShowListForm || (gridView1.RowCount > 0))
            {
                closeAction = this.ShowDialog();
                this.Dispose();
            }

            return secilenNesne;
        }
コード例 #5
0
 public ActionBase(bool editable, bool multiselect)
 {
     this.editable    = editable;
     this.multiselect = multiselect;
     returnType       = SelectionFormReturnType.AsIs;
 }
コード例 #6
0
 protected abstract mymodel.Entity[] ShowSelectionList(string searchField, object searchValue, bool returnOnMatch, bool editable, bool multiselect, SelectionFormReturnType returntype);
コード例 #7
0
 public SelectionFormBase()
 {
     returntype = SelectionFormReturnType.AsIs;
     multiselect = false;
 }