Example #1
0
        /// <summary>
        /// 记录添加。
        /// </summary>
        protected void ItemAdd()
        {
            ProviderEditorForm o = new ProviderEditorForm();

            if (o.ShowDialog() == DialogResult.OK)
            {
                DrugShop.Entities.Provider var = o.Provider;

                this.providerList.Insert(0, var);

                this.providerBindingSource.DataSource = null;
                this.providerBindingSource.DataSource = this.providerList;
            }
        }
Example #2
0
        /// <summary>
        /// 记录属性。
        /// </summary>
        protected void ItemProperty(DataGridViewRow row)
        {
            DrugShop.Entities.Provider provider = row.DataBoundItem as DrugShop.Entities.Provider;

            if (provider == null)
            {
                return;
            }

            ProviderEditorForm o = new ProviderEditorForm();

            o.Provider = provider;

            if (o.ShowDialog() == DialogResult.OK)
            {
                DrugShop.Entities.Provider var = o.Provider;

                this.InitRowInfo(row, var);
            }
        }