示例#1
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            UspUpdateUserHasRights userRightsPoco = new UspUpdateUserHasRights();

            userRightsPoco.XmlData = this.prepareUSPParam();
            logger.Info("Parameter for run procedure:UspUpdateRoleHasRights listed below:");
            logger.Info(userRightsPoco.XmlData);
            this.uspUserRightsDao.RunProc(userRightsPoco);
        }
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            UspUpdateUserHasRights uspUpdateUserHasRights = new UspUpdateUserHasRights();

            uspUpdateUserHasRights.XmlData = this.prepareUSPParam();
            logger.Info("XML data for USP to update:" + uspUpdateUserHasRights.XmlData);
            try
            {
                this.uspUserRightsDao.RunProc(uspUpdateUserHasRights);
                logger.Info("Rights of user updated done.");
                this.labelNotification.Text = "权限更新成功";
            }
            catch (Exception ex)
            {
                logger.Error("Update the rights failed with exception:" + ex.Message);
                this.labelNotification.Text = "权限更新失败,错误信息:" + ex.Message;
            }
        }
        public void RunProc(UspUpdateUserHasRights obj)
        {
            String stmtId = "uspUpdateUserHasRightsid";

            this.sqlMapper.QueryForObject(stmtId, obj);
        }