public Tuser CreateTuser(Tuser info)
        {
            try
            {
                string sqlCommand = @"INSERT INTO ""T_USER"" (""ID"",""USERCODE"",""USERNAME"",""LOGINID"",""USERPASSWORD"",""ISLOCK"",""ADMINFLAG"",""NOTE"",""EMAIL"",""EXT1"",""OAID"") VALUES (:Id,:Usercode,:Username,:Loginid,:Userpassword,:Islock,:Adminflag,:Note,:Email,:Ext1,:Oaid)";
                this.Database.AddInParameter(":Id", info.Id);//DBType:VARCHAR2
                this.Database.AddInParameter(":Usercode", info.Usercode);//DBType:VARCHAR2
                this.Database.AddInParameter(":Username", info.Username);//DBType:VARCHAR2
                this.Database.AddInParameter(":Loginid", info.Loginid);//DBType:VARCHAR2
                this.Database.AddInParameter(":Userpassword", info.Userpassword);//DBType:VARCHAR2
                this.Database.AddInParameter(":Islock", info.Islock);//DBType:VARCHAR2
                this.Database.AddInParameter(":Adminflag", info.Adminflag);//DBType:VARCHAR2
                this.Database.AddInParameter(":Note", info.Note);//DBType:VARCHAR2
                this.Database.AddInParameter(":Email", info.Email);//DBType:VARCHAR2
                this.Database.AddInParameter(":Ext1", info.Ext1);//DBType:VARCHAR2
                this.Database.AddInParameter(":Oaid", info.Oaid);//DBType:NUMBER
                this.Database.ExecuteNonQuery(sqlCommand);

            }
            finally
            {
                this.Database.ClearParameter();
            }
            return info;
        }
 public Tuser CreateTuser(Tuser info)
 {
     try
     {
         Management.BeginTransaction();
         Management.CreateTuser(info);
         Management.Commit();
     }
     catch
     {
         Management.Rollback();
         throw;
     }
     return info;
 }
 protected void ReadEntityToControl(Tuser userInfo)
 {
     litUsername.Text = userInfo.Username;//用户姓名
     litLoginid.Text = userInfo.Loginid;//登录账号
     litNote.Text = userInfo.Note;//备注
     var ownRoles = UsermaproleinfoService.RetrieveUsermaproleinfoByUseridRoleid(
         new List<string>() {userInfo.Id}, new List<string>());
     if(ownRoles.Count>0)
     {
         //已分配角色
         litLstmofifiedby.Text = ownRoles[0].Lastmodifiedby;
         if (ownRoles[0].Lastmodifieddate.HasValue)
         {
             litLastmodifieddate.Text = ownRoles[0].Lastmodifieddate.Value.ToString(UiConst.DateFormat);
         }
         ddlRoleList.SelectedValue = ownRoles[0].Roleid;
     }
 }
 public Tuser UpdateTuserById(Tuser info)
 {
     try
     {
         this.Database.AddInParameter(":Id", info.Id);//DBType:VARCHAR2
         this.Database.AddInParameter(":Usercode", info.Usercode);//DBType:VARCHAR2
         this.Database.AddInParameter(":Username", info.Username);//DBType:VARCHAR2
         this.Database.AddInParameter(":Loginid", info.Loginid);//DBType:VARCHAR2
         this.Database.AddInParameter(":Userpassword", info.Userpassword);//DBType:VARCHAR2
         this.Database.AddInParameter(":Islock", info.Islock);//DBType:VARCHAR2
         this.Database.AddInParameter(":Adminflag", info.Adminflag);//DBType:VARCHAR2
         this.Database.AddInParameter(":Note", info.Note);//DBType:VARCHAR2
         this.Database.AddInParameter(":Email", info.Email);//DBType:VARCHAR2
         this.Database.AddInParameter(":Ext1", info.Ext1);//DBType:VARCHAR2
         this.Database.AddInParameter(":Oaid", info.Oaid);//DBType:NUMBER
         string sqlCommand = @"UPDATE ""T_USER"" SET  ""USERCODE""=:Usercode , ""USERNAME""=:Username , ""LOGINID""=:Loginid , ""USERPASSWORD""=:Userpassword , ""ISLOCK""=:Islock , ""ADMINFLAG""=:Adminflag , ""NOTE""=:Note , ""EMAIL""=:Email , ""EXT1""=:Ext1 , ""OAID""=:Oaid WHERE  ""ID""=:Id";
         this.Database.ExecuteNonQuery(sqlCommand);
     }
     finally
     {
         this.Database.ClearParameter();
     }
     return info;
 }