Пример #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;
            }
        }
Пример #2
0
 private void UserInfo_Load(object sender, EventArgs e)
 {
     TechnologyLib technologyLib = new TechnologyLib(sqlConnection);
     dataSet = new DataSet();
     technologyLib.GetUserGrpDetailsViewData(dataSet);
     technologyLib.GetUserInfoDetailsViewData(dataSet);
     InitialTreeView(treeView1);
 }
Пример #3
0
        private void AddUser_Load(object sender, EventArgs e)
        {
            technologyLib = new TechnologyLib(sqlConnection);
            dataSet = new DataSet();
            technologyLib.GetUserGrpData(dataSet, UserGrpName);
            technologyLib.GetUserGrpDetailsViewData(dataSet);
            technologyLib.GetUserInfoDetailsViewData(dataSet);
            m_UserGrpID = technologyLib.GetUserGrpID(UserGrpName);

            switch (m_OperateFlag)
            {
                case 1:	//添加
                    textBoxBarCode.Text  = Convert.ToString(technologyLib.GetUserInfoMaxBarCode() + 1);
                    break;
                case 2:	//属性
                    textBoxBarCode.ReadOnly = true;
                    for (int i = 0; i < dataSet.Tables["UserInfoDetailsView"].Rows.Count; i++)
                    {
                        if (BarCode == dataSet.Tables["UserInfoDetailsView"].Rows[i]["BarCode"].ToString())
                        {
                            comboBoxUserGrpName.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["UserGrpName"].ToString();
                            textBoxBarCode.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["BarCode"].ToString();
                            textBoxUserName.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["UserName"].ToString();
                            textBoxUserPsw.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["Password"].ToString();
                            textBoxVerifyPsw.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["Password"].ToString();
                            comboBoxSex.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["Sex"].ToString();
                            textBoxTelephone.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["Telephone"].ToString();
                            dateTimePickerBirthday.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["Birthday"].ToString();
                            richTextBoxDescription.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["Description"].ToString();
                            comboBoxStatus.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["Status"].ToString();
                            break;
                        }
                    }
                    break;
            }
        }