Example #1
0
        private void AddUserGroup_Load(object sender, EventArgs e)
        {
            technologyLib = new TechnologyLib(sqlConnection);
            dataSet = new DataSet();
            technologyLib.GetRoleData(dataSet);
            technologyLib.GetUserPopedomData(dataSet);
            technologyLib.GetUserGrpDetailsViewData(dataSet);
            technologyLib.GetUserGrpData(dataSet, UserGrpName);
            m_UserGrpID = technologyLib.GetUserGrpID(UserGrpName);

            switch (m_OperateFlag)
            {
                case 1:	//添加
                    break;
                case 2:	//属性
                    for (int i = 0; i < dataSet.Tables["UserGrpDetailsView"].Rows.Count; i++)
                    {
                        if (m_UserGrpID == Convert.ToInt16(dataSet.Tables["UserGrpDetailsView"].Rows[i]["UserGrpID"]))
                        {
                            richTextBox1.Text = dataSet.Tables["UserGrpDetailsView"].Rows[i]["Description"].ToString();
                            break;
                        }
                    }
                    break;
            }
        }