コード例 #1
0
ファイル: AddClient.cs プロジェクト: Kiselb/bps
        private void addingGroup(int iMode)
        {
            AddGroup ag = new AddGroup();

            if (iMode == -1)
            {
                ag.tbName.Text = this.cmbGroup.Text;
            }
            ag.ShowDialog();
            if (ag.DialogResult == DialogResult.OK)
            {
                try
                {
                    BPS.BLL.Clients.DataSets.dsGroups.ClientsGroupsRow rw = (BPS.BLL.Clients.DataSets.dsGroups.ClientsGroupsRow) this.dvGroups.Table.NewRow();                    //((BPS.Clients.dsGroups.ClientsGroupsDataTable)this.cmbGroup.DataSource).NewRow();
                    rw.ClientGroupName    = ag.tbName.Text;
                    rw.ClientGroupRemarks = ag.tbRemarks.Text;
                    rw.IsInner            = false;
                    rw.IsSpecial          = false;
                    this.dvGroups.Table.Rows.Add((DataRow)rw);                     //((Clients.dsGroups.ClientsGroupsDataTable)this.cmbGroup.DataSource).AddClientsGroupsRow(rw);
                    AddGroup();
                }
                catch (Exception ex)
                {
                    MsgBoxX.Show(ex.Message, "BPS", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
        }
コード例 #2
0
ファイル: GroupClients.cs プロジェクト: Kiselb/bps
 private void AddAllRow(int identifier, bool condition)
 {
     BPS.BLL.Clients.DataSets.dsGroups.ClientsGroupsRow rw = (BPS.BLL.Clients.DataSets.dsGroups.ClientsGroupsRow) this.dvGroups.Table.NewRow();
     rw.ClientGroupID      = identifier;
     rw.ClientGroupName    = "<Все>";
     rw.ClientGroupRemarks = "<Все>";
     rw.IsInner            = condition;
     rw.IsSpecial          = condition;
     this.dvGroups.Table.Rows.Add(rw);
 }