Ejemplo n.º 1
0
 /// <summary>
 /// フォーム用選択項目情報の取得
 /// </summary>
 /// <remarks>
 /// 指定した事業所のフォーム用選択項目情報を取得する
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='companyId'>
 /// 事業所ID
 /// </param>
 /// <param name='includes'>
 /// 取得する項目(項目: account_item). Possible values include: 'account_item'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SelectablesIndexResponse> GetFormsAsync(this ISelectables operations, int companyId, string includes = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetFormsWithHttpMessagesAsync(companyId, includes, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 2
0
        public SelectForm(string header, string columntext, ISelectables list, System.Windows.Forms.ImageList largeimages, System.Windows.Forms.ImageList smallimages, int imageindex) : base()
        {
            InitializeComponent();
            try
            {
                SelectedItems                   = new System.Collections.Generic.List <ISelectable>();
                this.DialogResult               = System.Windows.Forms.DialogResult.Cancel;
                this.Text                       = header;
                this.listViewList.AutoArrange   = true;
                this.listViewList.FullRowSelect = true;
                this.listViewList.GridLines     = false;
                this.listViewList.MultiSelect   = false;
                if (largeimages != null)
                {
                    this.listViewList.LargeImageList = largeimages;
                }
                if (smallimages != null)
                {
                    this.listViewList.SmallImageList = smallimages;
                }
                this.listViewList.Columns.Add(new System.Windows.Forms.ColumnHeader());
                this.listViewList.Columns[this.listViewList.Columns.Count - 1].Text  = columntext;
                this.listViewList.Columns[this.listViewList.Columns.Count - 1].Width = -1;
                foreach (ISelectable selectable in list.GetSelectables())
                {
                    System.Windows.Forms.ListViewItem lvi = new ListViewItem(selectable.GetSelectText(), imageindex);
                    lvi.Tag = selectable;
                    this.listViewList.Items.Add(lvi);
                }
                switch (this.listViewList.View)
                {
                case System.Windows.Forms.View.Details:
                    this.listViewList.AutoResizeColumns(System.Windows.Forms.ColumnHeaderAutoResizeStyle.ColumnContent);
                    break;

                default:
                    this.listViewList.ArrangeIcons();
                    break;
                }
                if (this.listViewList.Items.Count > 0)
                {
                    this.listViewList.Items[0].Selected = true;
                }
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 3
0
 public SelectForm(string header, string columntext, ISelectables list) : this(header, columntext, list, null, null, 0)
 {
 }