Beispiel #1
0
        private void btn_OK_Click(object sender, EventArgs e)
        {
            if (!CheckInfo())
            {
                return;
            }

            DAL.DAL_Group    groupdal = new DAL.DAL_Group();
            DAL.DAO.GroupDao _dao     = new DAL.DAO.GroupDao();

            _dao.Grouppname   = txb_GroupName.Text;
            _dao.Groupmanager = txb_GroupManager.Text;
            _dao.Managerphone = txb_TelePhone.Text;
            _dao.Describe     = txb_Remark.Text;

            if (groupdal.insertGroup(_dao))
            {
                MessageBox.Show("添加成功");
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
            else
            {
                MessageBox.Show("添加失败");
            }
        }
Beispiel #2
0
        public bool insertGroup(DAL.DAO.GroupDao dao)
        {
            string sql = "insert into t_group (groupname,groupmanager,managerphone,`desc`) " +
                         " values('" + dao.Grouppname + "','" + dao.Groupmanager + "','" + dao.Managerphone + "','" + dao.Describe + "')";

            return(this.InsertQuery(sql));
        }
Beispiel #3
0
        private void CustomerAuthorize_Load(object sender, EventArgs e)
        {
            LoadLanguage("");

            DAL.DAL_Group groupdal = new DAL.DAL_Group();

            DAL.DAO.GroupDao groupdao = groupdal.selectGroupInfoWithId(groupid);

            this.lab_groupname.Text = groupdao.Grouppname;

            GetGroupAuthrize();
        }
Beispiel #4
0
        private void EditGroupForm_Load(object sender, EventArgs e)
        {
            LoadLanguage("");

            DAL.DAL_Group groupdal = new DAL.DAL_Group();

            groupdao = groupdal.selectGroupInfoWithId(groupid);

            if (groupdao == null)
            {
                MessageBox.Show("获取部门信息失败!");
                this.Close();
            }
            else
            {
                this.txb_GroupName.Text    = groupdao.Grouppname;
                this.txb_GroupManager.Text = groupdao.Groupmanager;
                this.txb_TelePhone.Text    = groupdao.Managerphone;
                this.txb_Remark.Text       = groupdao.Describe;
            }
        }