Exemple #1
0
        public int Update(Role Role)
        {
            DBHelper db = new DBHelper();
            DbCommand cmd = db.GetStoredProcCommand("p_Role_update");
            db.AddInParameter(cmd, "@Role_Code", DbType.Guid, Role.Role_Code);
            db.AddInParameter(cmd, "@Role_Name", DbType.String, Role.Role_Name);
            db.AddInParameter(cmd, "@DES", DbType.String, Role.DES);

            return db.ExecuteNonQuery(cmd);
        }
Exemple #2
0
        public int Save(Role Role)
        {
            DBHelper db = new DBHelper();
            DbCommand cmd = db.GetStoredProcCommand("p_Role_insert");//返回主键
            db.AddInParameter(cmd, "@Role_Name", DbType.String, Role.Role_Name);
            db.AddInParameter(cmd, "@DES", DbType.String, Role.DES);

            object res = db.ExecuteScalar(cmd);

            return res == null ? -1 :1;
        }
Exemple #3
0
 public int Update(UserInfo t)
 {
     DBHelper db = new DBHelper();
     DbCommand cmd = db.GetStoredProcCommand("p_UserInfo_Update");
     db.AddInParameter(cmd, "@UserID", DbType.String, t.UserID);
     db.AddInParameter(cmd, "@Link_Tel", DbType.String, t.Link_Tel);
     db.AddInParameter(cmd, "@Mob_Tel", DbType.String, t.Mob_Tel);
     db.AddInParameter(cmd, "@LoginID", DbType.String, t.LoginID);
     db.AddInParameter(cmd, "@Password", DbType.String, t.Password);
     db.AddInParameter(cmd, "@UserName", DbType.String, t.UserName);
     db.AddInParameter(cmd, "@Spell_Index", DbType.String, t.Spell_Index);
     db.AddInParameter(cmd, "@Sex", DbType.String, t.Sex);
     db.AddInParameter(cmd, "@IdentityCard", DbType.String, t.IdentityCard);
     db.AddInParameter(cmd, "@Birthday", DbType.String, t.Birthday);
     db.AddInParameter(cmd, "@EMail", DbType.String, t.EMail);
     db.AddInParameter(cmd, "@Addr", DbType.String, t.Addr);
     db.AddInParameter(cmd, "@State", DbType.String, t.State);
     return db.ExecuteNonQuery(cmd);
 }